[whatwg] Re: some issues

Malcolm Rowe malcolm-what at farside.org.uk
Tue Jul 6 01:06:31 PDT 2004

Matthew Raymond writes:
>    After going back an review your previous email and the latest WF2 
> draft, I figured out what the issue is. The WF2 draft modifies XHTML to 
> bring it in line with RFC3023 (http://www.ietf.org/rfc/rfc3023). From 
> Section A.4: 
> "Sniffing XML also isn't as simple as it might seem.  DOCTYPE declarations 
> aren't required, and they can appear fairly deep into a document under 
> certain unpreventable circumstances.  (E.g., the XML declaration, 
> comments, and processing instructions can occupy space before the DOCTYPE 
> declaration.) Even sniffing the DOCTYPE isn't completely reliable, thanks 
> to a variety of issues involving default values for namespaces within 
> external DTDs and overrides inside the internal DTD.  Finally, the variety 
> in potential character encodings (something XML provides tools to deal 
> with), also makes reliable sniffing less likely."

RFC3023 is talking about XML MIME types in general, and yes, in general, an 
XML document does not require a DOCTYPE. However, it appears that the XHTML 
specs *do* require a DOCTYPE for all valid XHTML documents (or at least, 
that's how the referenced sections of the XHTML specs seem to read to me). 

Now it's possible that I'm missing something, but it appears to be valid to 
raise the question about this particular point, since the WF2 spec does 
appear to be in direct conflict with the XHTML spec at this point (in a very 
small way, granted). 


More information about the whatwg mailing list