W3C home > Mailing lists > Public > www-style@w3.org > July 2011

Re: [Selectors4] case-insensitive attribute value matching (in XML)

From: Linss, Peter <peter.linss@hp.com>
Date: Mon, 25 Jul 2011 20:29:44 +0100
To: fantasai <fantasai.lists@inkedblade.net>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <6F190DD9-8EE6-450B-9FFE-ECD76945F80C@hp.com>
On Jul 25, 2011, at 11:45 AM, fantasai wrote:

> On 07/25/2011 11:17 AM, L. David Baron wrote:
>> On Monday 2011-07-25 10:03 -0700, fantasai wrote:
>>> 
>>> Added
>>>   http://dev.w3.org/csswg/selectors4/#attribute-case
>> 
>> I think putting the "i" outside of the [] is confusing -- it doesn't
>> *look* associated with the attribute selector.
>> 
>> I'd much rather see [att=val i] / [att="val" i] or
>> [att=val,i] / [att="val",i] or some other syntax that puts the
>> case-insensitive indicator *inside* the brackets.
> 
> That looks much better, yes. Fixed.

Agreed, that was my original proposal. The prose states "immediately inside the closing bracket", I'm not sure it should be that literal, whitespace and comments should be allowed between the 'i' and the ']'.

The grammar also needs to be updated for this, I propose:
  attrib
    : '[' S* [ namespace_prefix ]? IDENT S*
          [ [ PREFIXMATCH |
              SUFFIXMATCH |
              SUBSTRINGMATCH |
              '=' |
              INCLUDES |
              DASHMATCH ] S* [ IDENT | STRING ] S* [IDENT S*]?
          ]? ']'
    ;

I'm also wondering if we should have an 'always match case sensitively' identifier. At some point we also may want to add additional identifiers to select normalization modes, etc.

Peter
Received on Monday, 25 July 2011 19:31:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:42 GMT