[whatwg] doctype parsing

Henri Sivonen hsivonen at iki.fi
Sun Aug 22 05:26:33 PDT 2004


On Aug 22, 2004, at 14:15, Ian Hickson wrote:

> On Sun, 1 Aug 2004, Olav Junker [iso-8859-1] Kjær wrote:
>>
>> Is comments allowed before the doctype in HTML? In MSIE, a strict
>> doctype preceded by a comment will not trigger standards mode, but in
>> Mozilla it will. From the HTML 4 spec, its not clear whether comments 
>> is
>> allowed before the doctype. (Of course this must be defined somewhere 
>> in
>> SGML, but is seems that with XHTML appendix C, HTML has officially cut
>> its ties to SGML?)
>
> Good question. Does anyone have a copy of Goldfarb who can answer this?

I don't own a copy of The Handbook. I use the one in the HUT library 
when I need it. Thanks to the ISO pricing policy, no one owns (a copy 
of :-) the spec.

Comments are allowed:
http://www.w3.org/MarkUp/SGML/productions.html#prod8

IIRC, rickg's sniffing code didn't account for comments and dbaron 
specifically allowed them due to SGML when he rewrote the code.

-- 
Henri Sivonen
hsivonen at iki.fi
http://iki.fi/hsivonen/




More information about the whatwg mailing list