[Bug 6777] In HTML documents, no-namespace expression must match http://www.w3.org/1999/xhtml nodes

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6777


Henri Sivonen <hsivonen@iki.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ap@webkit.org




--- Comment #2 from Henri Sivonen <hsivonen@iki.fi>  2009-04-06 09:40:20 ---
(In reply to comment #1)
> (1) Could you please explain why the XPath 2.0 facility of defining a default
> element namespace for unprefixed QNames in an XPath expression is not adequate
> to meet the requirement?

The important thing is that specs and/or implementations need to change in such
a way that existing content that call document.evaluate() doesn't need to
change.

Changing document.evaluate() to supply a different namespace mapping context to
the XPath expression compiler would entail tampering with the values returned
by an arbitrarily programmable XPathNSResolver object.
http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathNSResolver

CCing Alexey Proskuryakov for comment about the implementation rationale in
WebKit. I sought to match the WebKit behavior exactly in Gecko and didn't
consider remapping the return values of XPathNSResolver instead.

> (2) XPath works on data conforming to the XDM data model. If you want to define
> a mapping from the concept of "HTML document" defined in HTML5 to the concept
> of an XDM document, then you are perfectly free to do so, and implementors are
> free to implement it. I would think that such a mapping belongs architecturally
> in the HTML5 specification rather than in the XDM specification.

HTML 5 defines its data model in terms of the DOM. DOM Level 3 defines a
mapping to the Infoset. XDM defines construction from an Infoset. Thus, an HTML
element in an HTML document is in the http://www.w3.org/1999/xhtml for the
purposes of XDM and defining this differently would be architecturally unsound
if the direct HTML 5 -> XDM and the indirect HTML 5 -> DOM -> Infoset -> XDM
mappings produced different XDM results.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 6 April 2009 09:40:31 UTC