W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2009

Re: [selectors-api] querySelector with namespace

From: Henri Sivonen <hsivonen@iki.fi>
Date: Thu, 26 Nov 2009 13:33:28 +0200
Cc: public-webapps@w3.org
Message-Id: <1CF45958-DEF8-44A8-A22B-2586B90AC7D1@iki.fi>
To: Jonathan Watt <jwatt@jwatt.org>
On Nov 26, 2009, at 13:18, Jonathan Watt wrote:

> During a discussion about xml:id I was about to make the throw away comment that
> you could use querySelector to easily work around lack of support for xml:id,
> but on checking it turns out that's not the case. querySelector, it seems,
> cannot be used to select on a specific namespace, since you can only use
> namespace prefixes in selectors, and querySelector does not resolve prefixes.

Isn't the easiest solution not to support xml:id on the Web? It's not supported in Gecko, WebKit or Trident. What's the upside of adding it?

xml:id doesn't enable functionality that the id attribute on HTML, MathML or SVG elements doesn't enable, but xml:id comes with all sorts of complications. In addition to this complication, it has the complication that in an xml:id-enabled world, an element doesn't have a single attribute that has IDness. Instead, it has to have two (the natural choice flowing from XML specs) or the IDness of attributes has to depend on the presence of other attributes (the choice taken by SVG 1.2 Tiny).

Henri Sivonen
Received on Thursday, 26 November 2009 11:34:06 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:21 UTC