[whatwg] doctype parsing

Ian Hickson ian at hixie.ch
Mon Aug 23 03:59:42 PDT 2004


On Sun, 22 Aug 2004, L. David Baron wrote:
>
> On Sunday 2004-08-22 11:15 +0000, 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 had a copy of Goldfarb in front of me (borrowed from a library) when I
> wrote the DOCTYPE parsing code currently used in Mozilla.  I wrote code
> that skips comments and processing instructions (although the
> processing-instruction skipping code isn't quite right), so IIRC they
> are allowed.

Okie dokie. Seems like nothing needs to be added to the WF2 spec then.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list