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

Re: [selectors-api] querySelector with namespace

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Thu, 26 Nov 2009 13:16:28 +0100
Message-ID: <4B0E719C.6010605@lachy.id.au>
To: Jonathan Watt <jwatt@jwatt.org>
Cc: public-webapps@w3.org
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.

What is the use case for xml:id on the web?

> Maybe the working group could consider adding some sort of "non-prefix"
> namespace support to selectors for the sake of querySelector/querySelectorsAll,
> something like:
>    [url("http://www.w3.org/XML/1998/namespace")|id="foo"]

Your proposal would require modifying the syntax of Selectors, which is 
out of scope for this working group.

As for the issue of resolving namespace prefixes, the previous attempt 
at including them in the API proved to be a very difficult, time 
consuming and costly effort that failed to reveal substantial use cases, 
nor find a viable solution.  As such, my current position is that there 
has been insufficient justification provided for spending such 
significant time and effort addressing this issue.

Lachlan Hunt - Opera Software
Received on Thursday, 26 November 2009 12:17:00 UTC

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