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

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 UTC