W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2006

[whatwg] [WA1] Missing state transitions?

From: Stewart Brodie <stewart.brodie@antplc.com>
Date: Thu, 20 Jul 2006 09:58:28 +0100
Message-ID: <5491a874d7ab520b765af2a8e573cddeca5acb8b@localhost>

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

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