W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2009

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

From: <bugzilla@wiggum.w3.org>
Date: Mon, 06 Apr 2009 08:31:20 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-6777-523@http.www.w3.org/Bugs/Public/>

           Summary: In HTML documents, no-namespace expression must match
                    http://www.w3.org/1999/xhtml nodes
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XPath
        AssignedTo: jonathan.robie@redhat.com
        ReportedBy: hsivonen@iki.fi
         QAContact: public-qt-comments@w3.org

HTML 5 harmonizes the DOM representation of HTML and XHTML so that HTML element
nodes parsed from text/html streams are assigned into the
http://www.w3.org/1999/xhtml namespace. 


(CSS has previously harmonized selector
namespace-sensitivity behavior so that HTML nodes are treated as if they were
in the http://www.w3.org/1999/xhtml namespace.)

Existing content expects to be able to use document.evaluate() to run XPath
expressions on DOM tree parsed from text/html in such a way that name
expressions that are in no namespace match against HTML elements that have the
local name specified in the expression. (Note that existing browsers already
store the local name in lower case internally, and HTML 5 exposes this through
the DOM localName property as well, so the local name is a non-issue here.)

Thus, to support existing content, implementations must during XPath evaluation
consider a name expression to match is the following case in addition to the
cases where it is already specified to match:
 * The name expression has no namespace.
 * The name expression has local name l.
 * The expression is being tested against an element node.
 * The element node has local name l.
 * The element node has namespace http://www.w3.org/1999/xhtml
 * The owner document of the element node is an "HTML document", where "HTML
document" is a term of the art defined in HTML 5:

I think the XPath specification should specify this behavior.

The relevant WebKit changeset is

The relevant Gecko bug is

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 08:31:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:27 UTC