W3C home > Mailing lists > Public > public-webapi@w3.org > February 2008

Re: [selectors-api] NSResolver and xml:* attributes (xml:id, xml:lang, xml:base, xml:space)

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Thu, 14 Feb 2008 17:52:58 +0100
Message-ID: <47B471EA.3050902@lachy.id.au>
To: Sergey Ilinsky <castonet@yahoo.co.uk>
CC: public-webapi@w3.org

Sergey Ilinsky wrote:
> I think specification misses a paragraph (or at least a note) on 
> handling selectors with xml:* attributes, the "xml" prefix is an 
> exception whose namespace doesn't need to be defined explicitly.
> I believe, a selector "html[xml|lang=en]" (running on the document 
> below taken from specification) should not raise a NAMESPACE_ERR 
> exception in case no NSResolver provided, that would currently be the 
> case.

If authors wish to write selectors to select xml:* or xmlns:* 
attributes, then they must declare prefixes for their namespace URIs. 
the xml: and xmlns: prefixes only only predefined when used in XML.  The 
prefixes used in selectors are independent from those.

For XML, those prefixes are bound to these namespaces for use in the DOM:

xml   http://www.w3.org/XML/1998/namespace
xmlns http://www.w3.org/2000/xmlns/

Lachlan Hunt - Opera Software
Received on Thursday, 14 February 2008 16:53:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:09:59 UTC