- From: Jonathan Watt <jwatt@jwatt.org>
- Date: Thu, 26 Nov 2009 12:18:30 +0100
- To: public-webapps@w3.org
Hi,
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.
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"]
or:
[namespace("http://www.w3.org/XML/1998/namespace")|id="foo"]
or:
[ns("http://www.w3.org/XML/1998/namespace")|id="foo"]
I imagine this would be much more widely useful than just for xml:id of course.
Jonathan
Received on Thursday, 26 November 2009 11:18:28 UTC