Re: [selectors4] List [xml:lang] and [xmlns] as selectors that do not work in XML

On Wed, 25 Sep 2013 19:34:19 +0200, Tab Atkins Jr. <jackalmage@gmail.com>  
wrote:

>>     [xml\:lang] { color: green } /* escaped the colon. */
>
> Correct, that wouldn't work, because "xml:" isn't part of the
> attribute's name, it's the syntax used to declare a namespace for the
> attribute.  This has nothing to do with xml:lang - all namespaced
> attributes work like this.

So a more appropriate example is that the following doesn't select an  
xml:lang attribute:

    [lang] { ... }

Although it seems reasonable to assume that some authors are going to try  
[xml:lang] and [xml\:lang] if they want to select it and don't know how  
namespaces work... I'm not convinced that the Selectors spec needs to  
explain how namespaces work, though. It's confusing, but most authors  
don't need to care, and explaining it in the spec seems like it would  
cause many authors who don't have to care spend time trying to understand  
it, effectively wasting their time.

-- 
Simon Pieters
Opera Software

Received on Thursday, 26 September 2013 08:07:10 UTC