W3C home > Mailing lists > Public > www-talk@w3.org > May to June 2001

Re: text/html for xml extensions of XHTML

From: David Carlisle <davidc@nag.co.uk>
Date: Wed, 2 May 2001 17:05:16 +0100
Message-Id: <200105021605.RAA27422@penguin.nag.co.uk>
To: RobertM@dessci.com
CC: hammond@csc.albany.edu, mozilla-mathml@mozilla.org, www-talk@w3.org

> Is anything allowed before the XML declaration? 


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

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.


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

This archive was generated by hypermail 2.4.0 : Monday, 20 January 2020 16:08:25 UTC