W3C home > Mailing lists > Public > www-validator@w3.org > September 2003

Re: Custom DTD for case-insensitive ID values ?

From: Philip TAYLOR [PC336/H-XP] <P.Taylor@Rhul.Ac.Uk>
Date: Sun, 14 Sep 2003 19:05:16 +0100
Message-ID: <3F64ADDC.F36452BA@Rhul.Ac.Uk>
To: "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Cc: www-validator@w3.org

"Jukka K. Korpela" wrote:


> Then you haven't read enough. You cannot rely on browsers distinguishing
> between anchors that differ in case only, and the results are thus
> unpredictable. Isn't it much simpler, and far more robust, to just rename
> the anchors as needed?

Well, the only access required to these IDs is for the "visibility"
attribute of their associated DIVs to be toggled by JavaScript.
Since JS /is/ case sensitive, and the browser has no reason to
need to differentiate between them, I thought I was safe (and
all tested browsers : NS4.79, IE6 & NS7.1 all behave exactly
as I had thought/hoped).  Yes, I could indeed rename one of
each pair, but differentiation by case is very convenient when
one has paired objects (a mouseover on one changes not only
the visibility of itself but also of its pair-mate).

> Well, that is possible, but I really don't think you should do that.
> Anyway, it can be done by location the following in the DTD:
> <!ENTITY % coreattrs
>  "id          ID           #IMPLIED  -- document-wide unique id --
> and changing ID (the uppercase string) to NAME. You could alternatively
> use CDATA, but that would be more permissive than you asked for.
> The syntactic rule for NAME values is the same as for ID values, but for
> ID, there is the added requirement of uniqueness.

Many thanks, Jukka : much appreciated!
** Phil.
Received on Sunday, 14 September 2003 14:03:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:38 UTC