Re: HTML ID case question

Steven Pemberton wrote:

>Alright, well we discussed this today, and we do have a position, and the
>good news is: nothing is broken, neither the spec, your code base, nor the
>validator.
>
>IDs are indeed case insensitive. And documents may not contain IDs that only
>differ in case. That is what section 12.2.1 of HTML 4.01 says.
>(http://www.w3.org/TR/html4/struct/links.html#h-12.2.1)
>
>This means if you have a URL "#GoOn", then it may only reference an element
>with id="GoOn", and not one with id="Goon" or id="goon".
>
>However, a document may not contain elements where one has id="GoOn" and
>another with id="Goon".
>
>So the validator is allowed to complain about your test document, because it
>has an id1 and an ID1, but you don't have to change your code base, and we
>don't have to change our spec.
>
>It is weird, but it's OK. No one has to fix anything!
>
   Ah, I see it now.  It's icky, but as you say, there it is, and if one 
splits the right hairs you get such a result.  (Not that I mean to 
criticize, since one must often split hairs to interpret specifications, 
and I've done so many times in the past while working with CSS.)  Still, 
I'd like to VERY strongly recommend that this error get an 
"explanation..." link in the validator results.  The link can point 
straight to the 12.2.1 of HTML 4, that's fine, just so long as it points 
somewhere that authors can use to understand how and why IDs (which are 
claimed to be case-sensitive in one place) can cause trouble when 
there's a case-insensitive match.

-- 
Eric A. Meyer ......................... emeyer@netscape.com
Standards Evangelist .................. http://developer.netscape.com/
TE/DS Team, Netscape Communications ... http://www.netscape.com/
Try the new Netscape 6.1 Preview Release!
http://home.netscape.com/browsers/6/index61pr.html

Received on Thursday, 12 July 2001 12:57:24 UTC