W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2009

Re: DOM XPath needs adjusting to work with HTML 5

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 6 Apr 2009 16:17:57 -0700
Message-ID: <63df84f0904061617r55200b33g3ac62dd527a7f2c5@mail.gmail.com>
To: Henri Sivonen <hsivonen@iki.fi>
Cc: www-dom@w3.org
On Mon, Apr 6, 2009 at 4:51 AM, Henri Sivonen <hsivonen@iki.fi> wrote:
> A successor of DOM Level 3 XPath (and, I presume, any spec specifying a JS
> API for initiating a transform on a DOM tree that might be created by
> parsing from text/html) need to specify that during XPath evaluation
> implementation must 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.
> AND
>  * The name expression has local name l.
> AND
>  * The expression is being tested against an element node.
> AND
>  * The element node has local name l.

this is a case insensitive comparison, right?

> AND
>  * The element node has namespace http://www.w3.org/1999/xhtml
> AND
>  * The owner document of the element node is an "HTML document" as defined
> in HTML 5:
> http://www.whatwg.org/specs/web-apps/current-work/#html-documents

Otherwise it sounds fine to me. We already do something very similar
in firefox where we do case insensitive comparisons for HTML elements.

Additionally, you need to define if the name() and local-name()
functions should return upper or lower case strings. IMHO they should
follow what .name and .localName returns.

/ Jonas
Received on Monday, 6 April 2009 23:18:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:00 GMT