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

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

From: Giovanni Campagna <scampa.giovanni@gmail.com>
Date: Wed, 28 Jan 2009 15:26:53 +0100
Message-ID: <65307430901280626l1274ce73o4bc73985a248ff8d@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>, www-html@w3.org

well, assuming that an author will need to match elements across
multiple namespaces, it will be easier to use XPath (that also is
compatible across multiple browsers) than to use horrible workarounds
like "svg :not(foreignObject) *[href]" (all svg links) or "svg
not(timesheet) animation" (all SVG but not SMIL animations), or
"select[bind], select[ref]" (xforms selects)
I think that those example are even easier to rewrite as
"svg|*[href]", "svg|animation", "xforms|select", provided a reliable
namespace binding mechanisms (the one I proposed)

I read all the old topic, the main points are:
1) discussion of pros and cons of available technologies (don't use
functions or objects to avoid infinite loops or recursion, don't use
string to avoid syntax problems), it looks that a NSResolver object (a
wrapped hash map, not an interface for a js function like
XPathNSResolver) is the best solutions
2) discussion of use cases for namespace resolution: authors are not
required to use javascript libraries (like Anne suggests), but current
workarounds are difficult, so use cases exist
3) decision to drop namespace support in current version: my proposal
is not necessarily for current version, but in version 2 (or level 2)
of selectors api we definetely need it.
Received on Wednesday, 28 January 2009 14:27:28 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 30 April 2020 16:21:06 UTC