[whatwg] [WebApps] Parsing: bogus DOCTYPE state

On Tue, 18 Jul 2006 20:20:44 -0400, Ian Hickson <ian at hixie.ch> wrote:

> Well, anything other than <!DOCTYPE HTML> is invalid, so there'll already
> be at least one parse error -- the DOCTYPE being invalid.

True.  I suppose that is sufficient of an indication of where other  
problems might originate.

> FWIW, my implementation, which has had very little work put into its
> error handling, reported:
>
>    16: Parse error: unexpected character while tokenising end of DOCTYPE.
>    41: Parse error: errorneous document type declaration.
>
> ...on your first example, and:
>
>    16: Parse error: unexpected character while tokenising end of DOCTYPE.
>    36: Parse error: errorneous document type declaration.
>
> ...on your second (and no other errors). Those don't seem like the wrong
> kinds of errors. :-)
>

When you consider the broader context, it would.  The first example would  
lead a conformance checker to complain about duplication of the <html>  
element if one was present later on in the document, and the second might  
lead a zealous checker to complain that no document language was  
specified.  Or at least I assume these would happen; I haven't stepped  
into the terrifying domain of the tree builder yet.

Still, I will concede that these are in the realm of edge cases probably  
not worth worrying about; forget I said anything. :)

-- 
J. King
http://jking.dark-phantasy.com/

Received on Tuesday, 18 July 2006 18:16:29 UTC