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

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

From: Erik Dahlström <ed@opera.com>
Date: Tue, 27 Jan 2009 09:14:39 +0100
To: "Lachlan Hunt" <lachlan.hunt@lachy.id.au>
Cc: "public-webapps@w3.org" <public-webapps@w3.org>, www-svg <www-svg@w3.org>
Message-ID: <op.uoeo6ptwgqiacl@gnorps.linkoping.osa>

On Mon, 26 Jan 2009 18:21:21 +0100, Lachlan Hunt <lachlan.hunt@lachy.id.au> 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.

Indeed that's the last unresolved SVG WG LC comment (having looked through the archives). We are satisfied with the current editors draft.

Thank you for adding the example. This compromise resolution is acceptable.

Cheers
/Erik, (ACTION-2378)

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Tuesday, 27 January 2009 08:13:24 GMT

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