Re: [xsl] E [Xerces] Attribute value "1" of type ID must be an NCName when namespaces are enabled.

Subject: Re: [xsl] E [Xerces] Attribute value "1" of type ID must be an NCName when namespaces are enabled.
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 17 Aug 2009 14:02:25 -0400

At 09:33 AM 8/13/2009, Eliot wrote:
> The message means exactly what it says. For bizarre historical reasons that
> few people remember, XML requires that an attribute value declared as being
> of type ID has the same syntax as an XML name - so it cannot start with a
> digit.

Looking at _The SGML Handbook_, I'm not finding a specific discussion of why
ID attributes are names other than a simple statement that IDs are names,

I don't remember ever discussing this aspect of SGML design with Charles
although I can imagine his thinking was that IDs are names and therefore
should conform to name lexical rules. I also suspect that Charles'
assumption, or in fact desire, was that element IDs be human-meaningful
names, rather than opaque identifiers used only by processors (e.g.,
pointers and addresses). Thus disallowing values consisting only of digits
would encourage the use of meaningful ID values. Maybe.

The campfire talk I heard was that the restriction that names not start with numbers goes back to IBM naming rules for files in some archaic OS.

But my informant could elucidate neither (a) why a naming rule for files should be applied to elements in SGML, nor (b) why IBM even had this naming rules for files.

Does this ring a bell, Eliot? (That would be character U+0007, also disallowed in names for perhaps more understandable reasons.)

BTW, this thread was always off topic.


Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.      
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
  Mulberry Technologies: A Consultancy Specializing in SGML and XML

Current Thread