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

RE: XML declaration in XHTML causes problems

From: Peter Foti (PeterF) <PeterF@SystolicNetworks.com>
Date: Fri, 30 Mar 2001 09:51:12 -0500
Message-ID: <A10A983C9DFBD4119F0300104B2EA6B7028D0C@ZIPPY>
To: "'www-html@w3.org'" <www-html@w3.org>
> -----Original Message-----
> From: Masayasu Ishikawa [mailto:mimasa@w3.mag.keio.ac.jp]On Behalf Of
> Masayasu Ishikawa
> Sent: Friday, March 30, 2001 9:15 AM
> To: Peter Foti (PeterF)
> Cc: www-html@w3.org
> Subject: 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.


I think that would help to remove any confusion.


> 
> > 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.


Perhaps the future edition might also contain a side note that the XML
declaration can cause problems in user agents that do not properly
recognize text/html files that contain processing instructions prior to
the DOCTYPE declaration?  Unfortunately, I had to find this out the hard
way.  I coded and XHTML site for someone (with the XML declaration), and
then later found out that the source was being displayed in IE 5.5 for
Mac.

Thanks,
Peter


> 
> > 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:48:34 GMT

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