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

[whatwg] [WebApps] "html" start tag token in main phase

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 8 Dec 2006 21:58:48 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0612082157250.16529@dhalsim.dreamhost.com>
On Fri, 8 Dec 2006, J. King wrote:
> The root element phase dictates that any start tag (including "html") 
> produces an <html> element in the document and is then re-processed in 
> the main phase. The main phase then states that if an "html" start tag 
> token is encountered it produces a parse error -unless- it's the first 
> start tag.
> Wouldn't it be simpler to just properly process the "html" start tag in 
> the root element phase instead of having such a special case?  I'm 
> certainly finding this special case to be needlessly difficult to deal 
> with.

You can implement it as you wish, so long as the result is the same. The 
reason for doing it this way was so that there was only one place in the 
spec that generated the <html> node, and then one only place that dealt 
with <html> attributes. This was done because it was expected that most 
implementations would pre-fill the stack with the <html> element, and so I 
wanted to make very sure they all handled attributes on <html> the same.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 8 December 2006 13:58:48 UTC

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