W3C home > Mailing lists > Public > www-validator@w3.org > August 2006

Re: ID case sensitivity still not explained

From: David Håsäther <hasather@gmail.com>
Date: Wed, 30 Aug 2006 10:30:00 +0200
Message-ID: <1a296f990608300130n43906615tc4c50d73d9ab783f@mail.gmail.com>
To: Barry <polisource@yahoo.com>
Cc: www-validator@w3.org

On 8/27/06, Barry <polisource@yahoo.com> wrote:

> The validator gave me an "already defined" error when
> I used IDs that differ
> by case only, but
> http://www.w3.org/TR/html401/struct/global.html#h-7.5.2
>
> says "id = name [CS]," which means id is case
> sensitive and IDs that differ by case should be
> considered unique and not produce "already defined"
> errors.

The specification is wrong here, since attributes that are of declared
type ID will be case folded.
This means that all of the following

 id="foo"
 id="Foo"
 id="fOO"

and so on, will be case folded by the SGML parser (the validator) to

 ID="FOO"

(the attribute name will also be case folded). Case folding is an SGML
feature, and is not something you need to understand. But now you know
why :-)

-- 
David Håsäther
Received on Wednesday, 30 August 2006 08:31:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:22 GMT