Re: XML declaration in XHTML causes problems

[ 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 UTC