W3C home > Mailing lists > Public > www-style@w3.org > April 2009

Re: [CSS21] 4.1.3 Characters and case: Number Sign (#) in identifiers

From: James Hopkins <james@idreamincode.co.uk>
Date: Wed, 22 Apr 2009 00:19:33 +0100
Cc: Thomas Phinney <tphinney@cal.berkeley.edu>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <31EC27DB-3DD5-4C40-B4E0-B156A79DFA66@idreamincode.co.uk>
To: Aryeh Gregor <Simetrical+w3c@gmail.com>
On 21 Apr 2009, at 22:43, Aryeh Gregor wrote:

> On Tue, Apr 21, 2009 at 5:35 PM, James Hopkins <james@idreamincode.co.uk 
> > wrote:
>> Based on your feedback, my conclusion is that 4.1.3 is in this  
>> respect is
>> unclear. The current spec states "... [identifiers] can contain  
>> only the
>> characters [a-z0-9] and ISO 10646 characters U+00A1 and higher,  
>> plus the
>> hyphen (-) and the underscore (_); they cannot start with a digit,  
>> or a
>> hyphen followed by a digit. Identifiers can also contain escaped  
>> characters
>> and any ISO 10646 character as a numeric code ..." If indeed the  
>> Number Sign
>> is lower than U+00A1 then how can it be acceptable within in an  
>> identifier,
>> without being escaped?
> Why do you think that # is acceptable in identifiers without being
> escaped?

First of all, apologies. I was restricting my train of thought to the  
use of CSS specifically with HTML, where 'id="invalid identifier"  
would be invalid. Although I haven't had any experience with applying  
CSS to XML, I guess a 'multi-id' selector incorporating the # notation  
would match such an attribute value where multiple tokens are legal.

> It would be syntactically ambiguous: does .foo#bar mean an
> element with class "foo#bar", or an element with class "foo" and id
> "bar"?  It's the latter, since # is not permitted unescaped inside
> identifiers.
Received on Tuesday, 21 April 2009 23:36:24 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:26 UTC