W3C home > Mailing lists > Public > www-html@w3.org > March 2001

Re: XML declaration in XHTML causes problems

From: Masayasu Ishikawa <mimasa@w3.org>
Date: Fri, 30 Mar 2001 23:14:57 +0900
To: PeterF@SystolicNetworks.com
Cc: www-html@w3.org
Message-Id: <20010330231457H.mimasa@w3.mag.keio.ac.jp>
[ Disclaimer: this is my personal opinion ]

"Peter Foti (PeterF)" <PeterF@SystolicNetworks.com> wrote:

> 1.  This says it's an example of a "minimal XHTML document".  That is
> not true, because a "minimal" XHTML document does not require the XML
> declaration.

The spec says it's "a" minimal XHTML document, the spec doesn't claim
it's "the" minimal XHTML document.  The XML declaration has been added
to this example upon request from the W3C Internationalization Working
Group.

That said,

> I think the work
> "minimal" should be removed from this statement.

If the word "minimal" sounds problematic, that could be changed in
the future edition.

> 2.  I have found that including the XML declaration on the first line
> causes pages to not be rendered as HTML in some browsers, including (but
> not limited to) IE 5.5 for Mac.

This is known issue, unfortunately.

> Would you call this "breaking backwards
> compatability"?

I'd rather say, those user agents are breaking forward compatability.
RFC 2854 "The 'text/html' Media Type" [1] notes in "5. Recognizing
HTML files" that HTML files may start with processing instructions
(introduced by "<?") prior to the DOCTYPE declaration.  Though the XML
declaration is not exactly a PI, HTML user agents should be prepared
to the possible existence of PI (or PI-like declaration) on the first
line.

[1] http://www.rfc-editor.org/rfc/rfc2854.txt

Regards,
-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium
Received on Friday, 30 March 2001 09:13:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:45 GMT