W3C home > Mailing lists > Public > www-style@w3.org > June 2008

Re: Substring matching attribute selectors

From: Alan Gresley <alan@css-class.com>
Date: Sat, 21 Jun 2008 15:17:41 +1000
Message-ID: <485C8EF5.3030407@css-class.com>
To: Gavin Sharp <gavin.sharp@gmail.com>
CC: Boris Zbarsky <bzbarsky@mit.edu>, www-style@w3.org

Gavin Sharp wrote:
> On Fri, Jun 20, 2008 at 8:12 PM, Alan Gresley <alan@css-class.com> wrote:
>> Just going the rounds with Gecko nightly 20 Jun 2008, I wondering what is
>> happening with those attribute selectors with empty strings.
>>
>> http://css-class.com/test/css/selectors/att/attribute-substring-match-empty.htm
>>
>> Now class^="" and class$="" are showing non matches. No other implementation
>> does this. The CSS WG last made a resolution [1] about empty substring
>> selectors in April. This is what the latest nightly seems to be following.
> 
>> [1] http://lists.w3.org/Archives/Public/www-style/2008Apr/0019.html
> 
> Yes, see https://bugzilla.mozilla.org/show_bug.cgi?id=420245 (comment
> 16 and on).
> 
> Gavin


Thanks Gavin, I now see the recent workings. It has been declared a bug 
by Mozilla since the CSS WG declared such empties string matches as 
invalid [1], but then this was retracted by the CSS WG [2] where they 
were considered valid but matched nothing. I then replied [3] that this 
could mean that any empty substrings would match if this was applied 
along with negation.

Indeed this is now the case.


http://css-class.com/test/css/selectors/att/not-attribute-substring-no-match-empty.htm


No other implementation does this.


I devised this test series in late January 2008 and was built up by 
logical testing. If I knew that my attribute selector test series would 
start this issue with empty strings, I would never have devised such a 
test series in the first place.


[1] http://lists.w3.org/Archives/Public/www-style/2008Feb/0333.html
[2] http://lists.w3.org/Archives/Public/www-style/2008Apr/0019.html
[3] http://lists.w3.org/Archives/Public/www-style/2008Apr/0021.html


Alan
Received on Saturday, 21 June 2008 05:18:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:07 GMT