Re: problem with t040103-ident-03-c.htm?

Stewart Brodie wrote:
> References: <46B27134.9090406@inkedblade.net>
> 
> CVS revision 1.4 of test case t040103-ident-03-c.xht
> 
> I've been looking at this test that was recently much enhanced to test valid
> and invalid class and ID selectors more thoroughly and fix issues with the
> earlier revisions, but I believe that there is still a problem with test
> case 4.  This is the case of the selector that is:
> 
> #-1ident, .four { color:red }
> 
> The lexical scanners in the CSS2.1 (19 July 2007) and CSS3's Selectors (15
> December 2005) specifications both agree that this selector is valid.  This
> is because both of them define names the same way:
> 
> name   {nmchar}+
> nmchar [_a-z0-9-]|{nonascii}|{escape}
> 
> %%
> 
> "#"{name}   { return HASH;}
> 
> 
> Is this an incorrect test case or are the specifications themselves not
> describing the intended scanner?  I'm not particularly bothered either way,
> but the inconsistency needs to be resolved.

In a lot of cases the grammar is more permissive than the prose. In these cases
the prose takes precedence.

According to
   http://www.w3.org/TR/CSS21/selector.html#id-selectors
an ID selector is an identifier, and these are not allowed to start with a hyphen
plus a number. I just checked with Bert, and he agrees the test is correct.

~fantasai

Received on Wednesday, 22 August 2007 13:49:42 UTC