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

On 07/25/2011 12:29 PM, Linss, Peter wrote:
> 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 ']'.

Good point. I switched "immediately inside" to "before". Does that work?

> 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*]?
>            ]? ']'
>      ;

Replaced.

> I'm also wondering if we should have an 'always match case sensitively' identifier.

I don't think there's really a good use case for that.

> At some point we also may want to add additional identifiers to select normalization modes, etc.

Noted. I'll hold off on adding it until someone shows that it's really needed, though. :)

~fantasai

Received on Monday, 10 October 2011 21:17:29 UTC