W3C home > Mailing lists > Public > www-svg@w3.org > January 2009

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

From: Erik Dahlström <ed@opera.com>
Date: Wed, 28 Jan 2009 11:17:49 +0100
To: "Henri Sivonen" <hsivonen@iki.fi>, "Alex Russell" <alex@dojotoolkit.org>
Cc: "Lachlan Hunt" <lachlan.hunt@lachy.id.au>, "Doug Schepers" <schepers@w3.org>, "public-webapps@w3.org" <public-webapps@w3.org>, www-svg <www-svg@w3.org>
Message-ID: <op.uogpjzb6gqiacl@gnorps.linkoping.osa>

On Wed, 28 Jan 2009 10:55:49 +0100, Henri Sivonen <hsivonen@iki.fi> wrote:

> On Jan 27, 2009, at 00:18, Alex Russell wrote:
>
>> We just need to invent a pseudo-property for elements which can be
>> matched by a ":not([someProperty=<your_ns_here>])".
>
>
> To select SVG elements while avoiding HTML elements of the same name,
> a selector that prohibits the local name foreignObject between an
> ancestor svg element and the selector subject would be good enough.

That wouldn't work for the general case though, since XML elements can occur anywhere in the svg markup. For an example, see Sun's Lively kernel[1].

But it's likely that there are selectors that would work for a majority of cases. Your statement does require that namespaces are not supported in the markup where the selectors API is used, or that it's guaranteed that no such markup occurs even though it may be permitted. Also such elements may be inserted through DOM calls, making the assumption about 'foreignObject' encapsulation invalid.

Cheers
/Erik

[1] http://research.sun.com/projects/lively/index.xhtml

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Wednesday, 28 January 2009 10:16:45 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:41 GMT