[whatwg] The problems with namespaces in text/html

Elliotte Harold elharo at metalab.unc.edu
Sun Nov 5 05:57:08 PST 2006

Bjoern Hoehrmann wrote:
> * Lachlan Hunt wrote:
>> Yes, never!  For one, a conforming HTML 5 (not XHTML 5) document 
>> requires the DOCTYPE to be <!DOCTYPE html> and that is not well-formed XML.
> Yes it is.

Good catch. I forgot that. There are one or two XML parsers that blow 
this one, but they're not much used. The specific BNF production is:

doctypedecl  ::= '<!DOCTYPE' S  Name (S  ExternalID)? S? ('[' intSubset 
']' S?)? '>'

External ID and system ID are both optional.

Is there anything else that stops every HTML5 document from being a 
well-formed XML document?

Elliotte Rusty Harold  elharo at metalab.unc.edu
Java I/O 2nd Edition Just Published!

More information about the whatwg mailing list