Andreas Reuleaux schrieb:
On Thu, Sep 01, 2005 at 11:44:48AM +0200, Tonico Strasser wrote:

And, as long pages are served as text/html they are treated as old-style
HTML by browsers anyway[1].

XHTML pages served as text/html must follow the compatibility
guidelines[2]. E.g. in ZPT HTML mode, elements like <br/> will be
converted to <br /> automagically (with space before the slash). That is
a good thing IMHO.

[1] Serving XHTML 1.0

[2] HTML Compatibility Guidelines


Tonico, I think you misunderstood something: While it is true that
pages served as text/html are treated as HTML by browsers,
there are still quite some differences how they treat the HTML,
i. e. in which mode they operate (doctype switching).

After rereading your posting, I think I understand what you mean. If you serve a XHTML page as text/html, a browser will treat this page as HTML4.x *not* XHTML. I'm not talking about browser rendering modes. That's why pages served as text/html should follow the XHTML compatibility guidelines, I think.

You can test this, create a HTML page and insert a document.write with JavaScript somewhere. You will notice, that it does not work in pages served as application/xhtml+xml. (You must use a browser which understands XHTML e.g. Mozilla, Opera or Konqueror).

Why document.write() doesn't work in XML


Zope3-dev mailing list

Reply via email to