[whatwg] [WA1] Missing state transitions?

I'm seeing inconsistent behaviour in my test pages due to an odd transition
in the "before head" state.  Consider these documents: one completely empty
(i.e. the first token delivered is the end-of-file token); another with just
"<html>" as its content, the third with content "<html></html>").  These
generate very different trees:

Empty content:  <html> <head> </head> <body> </body> </html>
<html>       :  <html> <head> </head> <body> </body> </html>
<html></html>:  <html> </html>

Surely all three should build to the same thing?  Or is this another example
of well-formedness overriding the implicit element generation?  The third
tree's brevity is caused because the </html> tag in "before head" is just
causing a switch to the trailing end phase.  It could just follow the
"anything else" case (and that would require "in body" to handle </HTML> too
(to act as if an eng tag for BODY had been seen and then reprocess the
current token - just like an end-of-file token).

-- 
Stewart Brodie
Software Engineer
ANT Software Limited

Received on Thursday, 20 July 2006 01:58:28 UTC