- From: Giovanni Campagna <scampa.giovanni@gmail.com>
- Date: Wed, 28 Jan 2009 14:25:29 +0100
- To: public-webapps@w3.org
Maybe it was already proposed, but are there any problem to just add a new argument to querySelectors and querySelectorsAll, with namespace bindings? I don't mean anything like XPathNSResolver or things like that. I just mean a ES Object, where enumerable property names are namespace prefixes, and their values are their URI. Invalid properties (whose name doesn't match the production for a namespace prefix in Namespaces in XML or whose value is not an URI) are simply ignored. That is, for any enumerable property in the new argument, a @namespace declaration will be implied. No other information will be considered (such as inherited bindings or @namespace declarations outside), any prefix not bound at selector resolution will cause a NAMESPACE_ERR. 1) people consider it adequate etc: well, it is easy to do (just {xhtm: "http://www.w3.org/1999/xhtml", svg: "http://www.w3.org/2000/svg" }) and poweful 2) don't have security issues: are there any security issues with namespaces in general? 3) don't have undefined behaviour: as I said, it acts like an implied sequence of @namespace, whose are fully covered (in good and bad behaviour) by Namespaces in CSS Hope you'll put this feature at least in version 2 of Selectors API, or people will go back to XPath. Giovanni
Received on Wednesday, 28 January 2009 13:27:01 UTC