Calling namespaceURI() on an element in an HTML document now gives "http://www.w3.org/1999/xhtml" namespace.
Created attachment 12917 [details] test case
<rdar://problem/4975136>
Is that wrong? I actually did that on purpose I think.
Hmm, now I checked HTML5, and it indeed says that HTML elements must be in XHTML namespace. Yet, this is not what I get from Firefox 2. Also, this appears to clash with XPath spec (which is very explicit about null namespaces, see <http://www.w3.org/TR/xpath#node-tests>), as queries like "//div" would no longer work in HTML. I guess our XPath implementation could be tweaked to account for this issue instead, but this would mean a rather unpleasant mismatch in behavior of different parts of DOM.
Classically, HTML has had a null namespace. We moved it to the XHTML namespace because HTML5 suggests this, and it gives a better match between HTML and XHTML behavior. We could reconsider this change, but since it is an intentional behavior change, I don't think we should track it as a regression or a P1 until we decide what to do.
> Also, this appears to clash with XPath spec FWIW, our XPath implementation now has a special case to hide this issue.
No longer willing to reconsider.