W3C home > Mailing lists > Public > public-html@w3.org > August 2007

Re: ID Characters (was: Re: 3.4. Global attributes)

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 01 Aug 2007 10:01:31 +0200
To: "Jim Jewett" <jimjjewett@gmail.com>, public-html@w3.org
Message-ID: <op.twde8tan64w2qv@annevk-t60.oslo.opera.com>

On Wed, 01 Aug 2007 00:00:03 +0200, Jim Jewett <jimjjewett@gmail.com>  
> Anne van Kesteren wrote:
>> Anyway, they handle it fine. In CSS you might
>> have to escape certain characters because the IDENT
>> production does not always allow them to occur literally.
> That is an important enough limit that it should probably be included
> in the good authoring advice, even if not in the actual grammar.
> Perhaps something like:
> Authors wishing to write robust applications are advised to use a more
> restricted set of IDs.  While "1" and $^&" are technically valid
> identifiers, they will trigger bugs in some tools.  Therefore, authors
> SHOULD stick to ID characters from the ASCII digits [0-9] and one case
> of ASCII letters (either [a-z] or [A-Z]), and SHOULD ensure that the
> first character of each ID is a letter rather than a digit.
> This probably applies to the name attribute as well.

It's not a bug in CSS. You can still select all possible IDs with CSS that  
you can express in HTML 5. It's just that you have to use a slightly  
awkward syntax for some of them. Also, if we're going to give advice for  
features because tools might have bugs in them that would triple the size  
of the specification and not make it very readable. Seems better for  
tutorials to cover such details. (Also, by the time HTML 5 reaches  
recommendation we're supposed to have two _complete_ implementations.)

Anne van Kesteren
Received on Wednesday, 1 August 2007 08:01:53 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:25 UTC