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 15:07:02 +0100
Message-ID: <4B0E8B86.4010708@lachy.id.au>
To: Jonathan Watt <jwatt@jwatt.org>
Cc: public-webapps@w3.org
Jonathan Watt wrote:
> On 2009-11-26 12:33 PM, Henri Sivonen wrote:
>> 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?
>
> Please note my use of the phrase "work around". Nowhere in my email did I
> suggest supporting xml:id on the Web. Nevertheless, that doesn't mean that Web
> content shouldn't be able to process XML that uses xml:id using script and
> present the processed information to the user using content and semantics that
> *does* "belong on the Web".
>
> Anyway, please also note that xml:id was just the example that drew my attention
> to this defficency in querySelector. It's an example, nothing more. The
> deficiency is my focus here.

I really do not understand what use case you are trying to address.  It 
appears that you are trying to find a solution to a problem that does 
not exist.

Why does it matter that the API can't select xml:id using a selector 
involving namespaces, especially given that xml:id is not used on the 
web, and even if it was, the ID selector would work fine?

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Thursday, 26 November 2009 14:07:40 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:35 GMT