W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2004

[whatwg] doctype parsing

From: L. David Baron <dbaron@dbaron.org>
Date: Sun, 22 Aug 2004 15:56:15 -0700
Message-ID: <20040822225615.GA27073@darby.dbaron.org>
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.

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20040822/3386faa5/attachment.pgp>
Received on Sunday, 22 August 2004 15:56:15 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:36 UTC