Re: Options for dealing with IDs

On Tuesday, January 7, 2003, 8:21:51 PM, Norman wrote:


NW> -----BEGIN PGP SIGNED MESSAGE-----
NW> Hash: SHA1

NW> <stage-direction>
NW> Norm leans forward, trying to see what's at the bottom of this particular
NW> slippery slope. Stepping gingerly forward...</stage-direction>

<camera-direction>
Camera pulls back to show that Norm and everyone else are peering at
a small slope on a tea tray, which they are standing on while
careering down a mountain at great speed </camera-direction>

NW> If we're going to start changing what IDs mean, and how they're
NW> identified (and I have real reservations about doing so),

I would have too if they were well defined.

In practice they are well defined for those parsers that do the
optional DTD validation and poorly defined for those specs that have
to dance around the fact that DTDs have likely not been fetched even
if they are referenced from the instance.

NW> I wonder if
NW> we should simultaneously try to fix the most common error I see in XML
NW> documents with respect to ID values: users trying to use unique values
NW> that do not satisfy the "Name" production as IDs:

NW>   <employee id="Norman Walsh"/>
NW>   <component id="001324"/>

I agree that I have seen those a lot. Spac seems on SGML terms to be
reserved as a list separator.

I can't see why XML forced IDs to start with an asci alpha character
though. Incrementing numbers has got to be the single most widely used
way of generating a large number of unique identifiers in the world.

Calling them i0001 i0002 i0003 i0004 is like FORTRAN all over again.


NW> I've seen several variations of the latter example where the name of
NW> the ID attribute was not "id".

Oh, you mean like SSN and part_number and all that sort of stuff?

NW> I don't think the options that force
NW> people to use the name "id" are very friendly.

Some of the listed options force people to use id. I agree those are
not very freindly - particularly since it is forced on people who
might be using id for something else or something else for ID.

Some of the options force people to use a different identifier. that
is better, especially if it is already reserved (xml:id) so that if
they have a clash then its already their fault.

The one I like best allows people to use whatever identifier they
like, usually for the price of a single extra attribute on the rot
element.



-- 
 Chris                            mailto:chris@w3.org

Received on Tuesday, 7 January 2003 15:41:19 UTC