Bug 12583 - reconsider giving HTML elements in non-XML HTML documents an XHTML namespaceURI
Summary: reconsider giving HTML elements in non-XML HTML documents an XHTML namespaceURI
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 12581
  Show dependency treegraph
 
Reported: 2007-02-04 07:51 PST by Alexey Proskuryakov
Modified: 2010-03-22 17:36 PDT (History)
0 users

See Also:


Attachments
test case (210 bytes, text/html)
2007-02-04 07:52 PST, Alexey Proskuryakov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2007-02-04 07:51:25 PST
Calling namespaceURI() on an element in an HTML document now gives "http://www.w3.org/1999/xhtml" namespace.
Comment 1 Alexey Proskuryakov 2007-02-04 07:52:38 PST
Created attachment 12917 [details]
test case
Comment 2 Maciej Stachowiak 2007-02-04 11:51:30 PST
<rdar://problem/4975136>
Comment 3 Dave Hyatt 2007-02-05 04:25:59 PST
Is that wrong?  I actually did that on purpose I think.
Comment 4 Alexey Proskuryakov 2007-02-05 06:53:07 PST
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.
Comment 5 Maciej Stachowiak 2007-02-07 00:33:00 PST
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.
Comment 6 Alexey Proskuryakov 2007-08-10 11:39:08 PDT
> Also, this appears to clash with XPath spec

FWIW, our XPath implementation now has a special case to hide this issue.
Comment 7 Alexey Proskuryakov 2010-03-22 17:36:31 PDT
No longer willing to reconsider.