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

On 18.2.2014 11:36, Simon Sapin wrote:
> The current ED defines:
> 
>> ::attr() = ::attr( <qualified-name> )
>>
>> Where <qualified-name> is a CSS qualified name.
> 
> With "CSS qualified name" a link to the css-namespaces spec.
> 
> css-namespaces defines <qname> and <wqname> grammar terms. Only the
> latter allows a wildcard for the namespace prefix: `*|localname`.
> selectors-nonelement should clarify which one is intended.

Hi Simon,

good point. Originally spec conatained a lot of adjusted text from
CSSNAMESPACES, but Tab removed it and added reference to <qualified-name>.

> The best way to do this IMO is to not define a new <qualified-name>
> grammar term, but use one of <qname> or <wqname> directly, specifying
> that it is defined in css-namespaces.

I have updated definition:

http://dev.w3.org/csswg/selectors-nonelement/#attribute-node-selector

I still use <qualified-name> term which is defined in the CSSNAMESPACES,
mainly because there is not better anchor in the referenced spec. Please
let me know whether you think it is clear enough now.

> In http://lists.w3.org/Archives/Public/www-style/2014Feb/0546.html,
> Jirka Kosek said:
>> You can select all attributes by ::attr(*)
> 
> According to the current ED you can not. `*` matches none of <qname>,
> <wqname>, or "CSS qualified name".
> 
> If the intent is to allow this, selectors-nonelement needs additional
> spec text, similar to how type selectors and universal selectors are
> defined separately.
> Also, it’s not clear that ::attr(*) selects all attributes rather than
> just attributes that are in no namespace.

I added it into grammar and added one paragraph description.

> So the "default" behavior of ::attr(foo) and ::attr(*), with the prefix
> omitted, is to select attributes in no namespace.

::attr(*) selects all attributes with or without namespace.

Thanks for valuable comments.

    Jirka

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
------------------------------------------------------------------
    Bringing you XML Prague conference    http://xmlprague.cz
------------------------------------------------------------------

Received on Tuesday, 18 February 2014 13:31:20 UTC