W3C home > Mailing lists > Public > www-style@w3.org > February 2014

Re: [selectors-nonelement] ::attr(*|localname), ::attr(ns|*), and ::attr(*)

From: Simon Pieters <simonp@opera.com>
Date: Mon, 24 Feb 2014 14:01:56 +0100
To: "Tab Atkins Jr." <jackalmage@gmail.com>, "Jirka Kosek" <jirka@kosek.cz>
Cc: "Simon Sapin" <simon.sapin@exyr.org>, www-style <www-style@w3.org>
Message-ID: <op.xbsehidiidj3kv@simon-pieterss-macbook.local>
On Wed, 19 Feb 2014 08:56:41 +0100, Jirka Kosek <jirka@kosek.cz> wrote:

> On 19.2.2014 1:43, Tab Atkins Jr. wrote:
>>>> If the prefix is omitted, the selector only matches attributes in no
>>>> namespace.
>>>
>>> … which applies to both ::attr(foo) and ::attr(*)
>>>
>>> I like the consistency, but it means that "give me all the things"  
>>> must be
>>> written ::attr(*|*) rather than just ::attr(*), which doesn’t seem to  
>>> be
>>> what Jirka wanted.
>>
>> That's consistent with what Selectors does for type selectors, though.
>>  I'd be extremely loathe to break that consistency.
>
> I'm not sure with what you are trying to be consistent, if with the
> following from the Selectors:
>
> "*
> if no default namespace has been specified, this is equivalent to *|*.
> Otherwise it is equivalent to ns|* where ns is the default namespace."
>
> Then I have to point out that default namespace does not apply to
> attributes, so it doesn't make sense to align * behaviour for attributes
> with elements.
>
> Or had you in mind something different?

I'm not Tab but I think the reasoning is as follows:

* and foo are equivalent for the namespace part, i.e. same as *|* and  
*|foo or ns|* and ns|foo

hence

::attr(*) and ::attr(foo) should also be equivalent for the namespace  
part, i.e. same as ::attr(|*) and ::attr(|foo)

-- 
Simon Pieters
Opera Software
Received on Monday, 24 February 2014 13:02:28 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:19 UTC