W3C home > Mailing lists > Public > www-html-editor@w3.org > July to September 2004

XHTML-FAQ: "Does document.write work in XHTML?"

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Fri, 16 Jul 2004 20:09:31 +0200
To: www-html-editor@w3.org
Message-ID: <410219c8.105235600@smtp.bjoern.hoehrmann.de>

Dear HTML Working Group,

  On http://www.w3.org/MarkUp/2004/xhtml-faq.html#docwrite you write:

  Does document.write work in XHTML?

  No. Because of the way XML is defined, it is not possible to do
  tricks like this, where markup is generated by scripting while the
  parser is still parsing the markup.

  You can still achieve the same effects, but you have to do it by
  using the DOM to add and delete elements.

I am not sure what I am missing here. Surely it works for HTML
documents, so it seems that you are referring to a difference between
XML and SGML here. I do not really have an idea what that difference
could be, if one processes the XHTML document in an SGML processor,
things would certainly work, so, could you please explain in more detail
what the difference is supposed to be? To me it seems trivial to
implement it, and my understanding so far is that people don't want it
to work, rather than that there is a technical impossibility to make it

Received on Friday, 16 July 2004 14:10:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:08:53 UTC