Re: Case folding (lack thereof) in the doctype name state

On 10/15/08, Henri Sivonen <hsivonen@iki.fi> wrote:
>
> Is there a reason why the doctype name isn't case-folded in the
> tokenizer like element and attribute names?
>
> Of the APIs I've tried to map HTML5 to, so far both APIs that
> distinguish between interned and non-interned strings (Java SAX and
> Gecko internal APIs) treat the doctype name as an interned string.
> Doing a case-insensitive compare of interned strings in the tree
> builders goes against the point of having interned strings for names.
> It's doable of course, but the exceptional treatment of this
> particular name is weird (and for a portable parser, requires yet
> another one-off comparison method in the portability layer).
>
> Live DOM Viewer situation:
>   * Firefox 3.0.3 does not fold bogus names in the tokenizer but folds
> corrent names to upper-case "HTML".
>   * WebKit 35752 doesn't fold.
>   * Opera 9.60 doesn't show a doctype node at all.
>   * IE8b2 inserts a bogus comment.
>
> Since IE and Opera get away with not inserting a proper doctype node
> and I found not fixed bugs on this topic on b.m.o or bugs.webkit.org,
> I suspect folding vs. later case-insensitive compare isn't an interop-
> sensitive thing considering existing content.

For Opera, try <http://labs.opera.com/news/2008/03/28/>. It's doesn't
necessarily reflect the latest and greatest, but the doctype node will
be there. (although for 'html', .name for it might be htm instead of
html in that build).

-- 
Michael

Received on Wednesday, 15 October 2008 14:58:26 UTC