W3C home > Mailing lists > Public > public-html@w3.org > August 2007

Re: let authors choose text/html or application/xhtml+xml (detailed review of section 1. Introduction)

From: Sam Ruby <rubys@us.ibm.com>
Date: Fri, 31 Aug 2007 18:07:21 -0400
Message-ID: <46D89119.8050407@us.ibm.com>
To: Philip Taylor <philip@zaynar.demon.co.uk>
CC: "public-html@w3.org WG" <public-html@w3.org>

Philip Taylor wrote:
> 
> Dan Connolly wrote:
>> XHTML documents served as text/html result in interoperable behavior
>> in typical cases, so that constraint is too strong. Please change
>> it to "SHOULD be sent..." and "SHOULD NOT be served...".
> 
> Several typical cases result in non-interoperable behaviour in current 
> browsers - e.g. <script src="..."/> acts inconsistently when parsed as 
> text/html:
> 
> http://software.hixie.ch/utilities/js/live-dom-viewer/?%3Chtml%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%0D%0A%3Chead%3E%0D%0A%3Ctitle%3E%26lt%3Bscript%2F%26gt%3B%20in%20XHTML-as-text%2Fhtml%3C%2Ftitle%3E%0D%0A%3Cscript%20type%3D%22text%2Fjavascript%22%20src%3D%22emptyfile.js%22%2F%3E%0D%0A%3C%2Fhead%3E%0D%0A%3Cbody%3E%0D%0A%3Cp%3EBody%3C%2Fp%3E%0D%0A%3C%2Fbody%3E%0D%0A%3C%2Fhtml%3E 
> 
> Firefox 2, Opera 9.2, Safari 3: shows the text "Body".
> Firefox 3 (2007-08-05), IE7: shows no text.
> 
> CDATA acts inconsistently too:
> 
> http://software.hixie.ch/utilities/js/live-dom-viewer/?%3Chtml%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%0D%0A%3Chead%3E%0D%0A%3Ctitle%3E%3C%2Ftitle%3E%0D%0A%3C%2Fhead%3E%0D%0A%3Cbody%3E%0D%0A%3Cp%3E%3C!%5BCDATA%5B%20%5B%3E%20%5D%5D%3EBody%3C%2Fp%3E%0D%0A%3C%2Fbody%3E%0D%0A%3C%2Fhtml%3E 
> 
> Firefox 2, 3: shows "Body".
> Safari 3, IE7: shows "]]>Body".
> Opera 9: shows no text. (It's weirder if you use a static file instead 
> of the Live DOM Viewer - it shows "y".)
> 
> <?xml ...?> declarations cause more inconsistency since they make IE6 
> render in quirks mode.
> 
> Only the subset of XHTML documents which also comply with some Appendix 
> C-like (but much stricter and more detailed) guidelines could be served 
> as text/html without practical problems. For interoperable processing by 
> existing UAs, normal XHTML documents (i.e. those not carefully 
> constructed to work as HTML) must not be text/html.

You can find a somewhat more complete list here:

http://wiki.whatwg.org/wiki/HTML_vs._XHTML

- Sam Ruby
Received on Friday, 31 August 2007 22:07:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:05 GMT