[whatwg] Bug in "Before DOCTYPE name state"?

Thomas Broyer t.broyer at gmail.com
Thu Dec 21 10:03:34 PST 2006


2006/12/21, Anne van Kesteren:
> On Thu, 21 Dec 2006 18:09:43 +0100, Thomas Broyer wrote:
> > But it also has this note, which is quite confusing: "Because
> > lowercase letters in the name are uppercased by the algorithm above,
> > the "HTML" letters are actually case-insensitive relative to the
> > markup."
>
> During tokenization you store the lowercase ASCII characters as uppercase.
> So you can do a case-sensitive comparison with "HTML" in the end ("HTML"
> will also end up in the DOM or whatever model you use there).
>
> In the markup it could be written as <!doctype html> which is what is
> suggested there.

Ah, ok, that what I thought.

So what's the prupose of marking the DOCTYPE "in error" in the "before
DOCTYPE name state" when it finds a lowercase 'h' if it's set back to
"correct" in "DOCTYPE name state" if it actually was followed by the
three letters "tml" (case-insensitively)?

> > However, section 8.1.1 says:
> > http://www.whatwg.org/specs/web-apps/current-work/#doctype
> > """
> > In other words, <!DOCTYPE HTML>, case-insensitively.
> > """
> >
> > So I guess you're right.
>
> Learned this when writing the implementation of it :-)

So <!doctype html> should not produce a parse rror? or should it?

-- 
Thomas Broyer



More information about the whatwg mailing list