W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2009

Re: [selectors-api] SVG WG Review of Selectors API

From: Alex Russell <alex@dojotoolkit.org>
Date: Mon, 26 Jan 2009 10:11:07 -0800
Cc: Erik Dahlström <ed@opera.com>, Doug Schepers <schepers@w3.org>, "public-webapps@w3.org" <public-webapps@w3.org>, www-svg <www-svg@w3.org>
Message-Id: <8E021FCF-453F-482A-A298-81898D3A3187@dojotoolkit.org>
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>

Can this be represented in a :not() clause somehow? Foisting more work  
onto script is the wrong answer.

Regards

On Jan 26, 2009, at 9:21 AM, Lachlan Hunt wrote:

>
> Lachlan Hunt wrote:
>> Erik Dahlström wrote:
>>> On Mon, 08 Dec 2008 17:26:18 +0100, Lachlan Hunt
>>> <lachlan.hunt@lachy.id.au> wrote:
>>>>> == 8. Examples
>>>>>
>>>>> Please add an example such as this one:
>>>>> ...
>>>>> Then explain how to use the Selectors API to select only the svg
>>>>> 'font' elements and how to select only the svg font elements that
>>>>> have a prefix on the element.
>>>>
>>>> As Boris explained, and as I'm sure you're well aware, it is not  
>>>> possible to distinguish between elements with the same local name  
>>>> without using namespaces.  I cannot demonstrate the impossible and
>>>> have not included the example in the spec.
>>>
>>> The SVG WG disagrees with this reasoning. People will run into  
>>> this problem, and it seems appropriate to give an example and to  
>>> show how to work around the lack of namespace-aware selectors.  
>>> Note that even if it's not possible to distinguish between the  
>>> elements using Selectors API alone, the result can be filtered e.g  
>>> using DOM Core methods to give a meaningful result. Another  
>>> workaround could be to pass a descendant combinator selector such  
>>> as "svg font" to check the the <font> element has an <svg> element  
>>> ancestor, this would cover many of the use-cases.
>> I will reconsider this issue shortly.
>
> Erik provided me with demo to base the example on.  I have  
> simplified it to illustrate the relevant technique and included the  
> example within the spec.  You may review the changes in the latest  
> editor's draft.
>
> http://dev.w3.org/2006/webapi/selectors-api/#examples0
>
> I believe this was the last issue from the SVG WG I needed to  
> resolve. Please let me know if you are satisfied with this response,  
> and my previous resolutions for other issues.
>
> -- 
> Lachlan Hunt - Opera Software
> http://lachy.id.au/
> http://www.opera.com/
>
Received on Monday, 26 January 2009 18:11:47 GMT

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