W3C home > Mailing lists > Public > www-validator@w3.org > July 2001

Re: HTML ID case question

From: Lloyd Wood <l.wood@eim.surrey.ac.uk>
Date: Thu, 12 Jul 2001 18:10:22 +0100 (BST)
To: Eric Meyer <emeyer@netscape.com>
cc: www-validator@w3.org, Robert Clary <bclary@netscape.com>
Message-ID: <Pine.GSO.4.21.0107121802280.24236-100000@phaestos.ee.surrey.ac.uk>
On Thu, 12 Jul 2001, Eric Meyer wrote:

> 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.

Quick (possibly useful) analogies for an explanation here:

consider filename conventions on MacOS, where case is preserved but
there are similar problems that would involve case-insensitive
matches. (Sticking MacOS on top of the unix filesystem in MacOS X
produced a number of contortions.)


or consider use of Apache's mod_speling, and similar pitfalls in use
with directories or files named the same bar case; which one should
mod_speling match a misspelt request to?


In all cases, providing case-insensitive matches is best avoided.


Received on Thursday, 12 July 2001 13:10:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:58:22 UTC