W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > June 1997

Re: IDs - make them case sensitive

From: Martin Bryan <mtbryan@sgml.u-net.com>
Date: Sat, 28 Jun 1997 13:24:09 +0100
Message-Id: <1.5.4.32.19970628122409.006a3dc0@mail.u-net.com>
To: w3c-sgml-wg@w3.org
At 12:03 27/6/97 -0700, Tim Bray wrote:

>No, we don't want a lexical model.  We want CDATA, but unique.  Which
>is not too much for XML.  But it's violently non-8879-conformant. -T.

There is nothing to stop XML from saying that the values for any CDATA
attribute called id (but not ID as this is a case sensitive system:-)) in an
XML document must have a unique name.

The reason for IDs being Name and therefore case sensitive is that for SGML
all names are case sensitive. This allows you to put <p> and <P> and <p
ID="x"> and <P id="X"> without fear of creating a clash because you were in
the wrong shift at the time you entered it. For most users this is
essential. If you ever try to use a system with NAMECASE GENERAL NO in its
SGML decalaration you will soon experience the problems it creates. 

WG8 has discussed the problem with ID shift before, and will probably offer
a switch that allows different rules to be applied to names within attribute
values (including the use of digits in NAMES as well as NMTOKENS, which is
the currently valid way of allowing names that start with numbers). It will
probably have to add another switch to provide optionality for ID naming
[something along the linees of IDTYPE=(NAME|NMTOKEN|CDATA)]. I would bet
that after a few weeks of use the CDATA switch will be abandoned in the face
of frantic user complaints.

For the time being I would suggest that XML simply removes ID as a class of
names and recommends that users use of a CDATA called id, and applies an
XML-specific semantic requiring uniqueness of values for this attribute
within a document. (And within any elements users may choose to add to the
document through SHOW=EMBED.) Such an approach would not be violently
non-8879-conformant.
----
Martin Bryan, 29 Oldbury Orchard, Churchdown, Glos. GL3 2PU, UK 
Phone/Fax: +44 1452 714029  E-mail: mtbryan@sgml.u-net.com 
For details about The SGML Centre contact http://www.sgml.u-net.com/
For details about the Open Information Interchange initiative contact
http://www.echo.lu/oii/home.html
Received on Saturday, 28 June 1997 08:25:04 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 10:04:44 EDT