Re: ID case sensitivity still not explained

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 UTC