Re: Placing elements in the HTML namespace

On Jan 15, 2009, at 5:31 AM, James Graham wrote:

>
> Sam Ruby wrote:
>> HTML5 parsing is defined in terms of the DOM produced.
>> If you take a simple HTML page (without xmlns marker attributes),  
>> and parse it by the Gecko, Presto, or WebKit layout engines's  
>> parsers, what namespace are the DOM elements produced in?
>
> null, null, http://www.w3.org/1999/xhtml, respectively.
>
>> To me, DOM consistency would argue that html5lib should do likewise.
>
> IIRC the spec follows webkit here because it make the XHTML and HTML  
> cases more similar ("DOM Consistency"). I guess this will case some  
> breakage e.g. in js libraries that use XPath to select elements. So  
> it is possible that "Don't Break The Web" also comes into this, but  
> I have no idea how significant it is.

WebKit followed the spec here, not vice versa. We put HTML elements in  
HTML documents in the HTML namespace as an early implementation of  
this aspect of HTML5, and essentially to prove this change is  
sufficiently Web-compatible. Based on our experience having this  
change for a few years and shipping several Safari releases with it, I  
would say it is sufficiently compatible. We have found only a handful  
of minor problems, which we were generally able to work around or get  
fixed on the server side.

Regards,
Maciej

Received on Friday, 16 January 2009 02:43:12 UTC