Re: [selectors-api] querySelector with namespace

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
http://lachy.id.au/
http://www.opera.com/

Received on Thursday, 26 November 2009 12:17:00 UTC