W3C home > Mailing lists > Public > public-html@w3.org > January 2009

Re: Placing elements in the HTML namespace

From: Henri Sivonen <hsivonen@iki.fi>
Date: Thu, 15 Jan 2009 17:46:14 +0200
Cc: Sam Ruby <rubys@us.ibm.com>, HTML WG <public-html@w3.org>
Message-Id: <D80BD9D0-8357-4F07-9387-EE40D8C711BD@iki.fi>
To: James Graham <jgraham@opera.com>

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

> 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.

Given that WebKit has non-trivial market share and given that Gecko,  
WebKit and Presto are usually given roughly the same JS code path to  
run, there's a good reason to believe that implementing the spec won't  
Break the Web (not counting intranets).

>> Providing an option to turn this behavior off (with the option  
>> defaulting to false) is not something I would see as a problem.
> That would be a "don't comply with the spec" option. Which I will  
> include if the spec doesn't change. But if people are choosing to  
> ignore MUST level requirements in the spec for the benefit of their  
> users (even as an option) it suggests a bug in the spec.

As far as the interop goals of HTML5 go, the important thing is what's  
exposed to scripts that see the DOM is what the spec says. If you have  
another kind of app, and taken as a whole its behavior is black-box  
indistinguishable from what the spec says, the spec shouldn't be  
normative over what interfaces you have inside the black box.

So I think the spec should continue to require the DOM to expose the  
XHTML namespace URI to scripts, but applications should be permitted  
to configure html5lib to represent the XHTML namespace URI as the  
empty string within the process space of the application.

FWIW, with SAX (when used cluefully) and with the Gecko-internal APIs,  
it's equally efficient to use no namespace and the XHTML namespace.  
With Java DOM and XOM, using the XHTML namespace is less efficient  
than using no namespace, but, still, I'm not going to offer the option  
of using no namespace in DOM and XOM.

Henri Sivonen
Received on Thursday, 15 January 2009 15:47:01 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:41 UTC