- From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
- Date: Mon, 26 Jan 2009 18:21:21 +0100
- To: Erik Dahlström <ed@opera.com>
- Cc: Doug Schepers <schepers@w3.org>, "public-webapps@w3.org" <public-webapps@w3.org>, www-svg <www-svg@w3.org>
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 17:22:09 UTC