Re: text/html for xml extensions of XHTML

> Is anything allowed before the XML declaration? 

No.

The idea is that the parser can auto-detect the encoding by looking at
the first few bytes and seeing if those equate to <?xml in any known
encoding, there's an appendix in the xml rec with all the gory details.

> In a perfect would I would have been shipped as text/xml. Please help
> me!"

The comment would have to go after the xmldec (If there was a
declaration). I think though the xml declaration on its own ought to
suffice. 

While it _is_ a legal PI for SGML and so HTML there can not be any real
files in existence that start <?xml version="1.0"  and aren't trying to
be XML.

Without knowing anything of the internals of mozilla it's hard to
believe that there is really big performance hit to back out of 
HTMl parsing if the first four characters in a file are <?xml 
(This is a lot easier to do than looking for regexp's in doctypes
as others have suggested), although its not entirely trivial due to
encoding considerations.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp

Received on Wednesday, 2 May 2001 12:05:42 UTC