Re: ID

Dave Raggett (dsr@w3.org)
Wed, 24 Sep 1997 15:10:40 -0400 ()


Date: Wed, 24 Sep 1997 15:10:40 -0400 ()
From: Dave Raggett <dsr@w3.org>
To: MegaZone <megazone@livingston.com>
cc: www-html@w3.org
In-Reply-To: <199709241114.EAA15137@server.livingston.com>
Message-ID: <Pine.WNT.3.95.970924150755.-95687K-100000@hazel.hpl.hp.com>
Subject: Re: ID

On Wed, 24 Sep 1997, MegaZone wrote:

> Simple question - are spaces allowed in 'id'?
> 
> ie. <P id="First Paragraph">
> 
> Now, after reading the spec I think no.  As 'axes' is a space seperated
> list of 'id' values, a space in an id attribute would not be acceptable.
> 
> I'm editing a book and the author used an example like that.  I changed
> it to being hyphenated, but I want to make sure I did the right thing.

IDs are sgml name values and as such can contain 0-9 A-Z - and .
There has been a lot of discussion on case sensitivity. In general
case folding is tricky for Unicode. For IDs this isn't a problem
and SGML defines these as case insensitive. The HTML working group
advocates that you use IDs case sensitively though for consistency
with the name attribute on anchors.

Regards,

-- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
phone: +44 122 578 2521 (office) +44 385 320 444 (gsm mobile)
World Wide Web Consortium (on assignment from HP Labs)