xsl-list
[Top] [All Lists]

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

2009-08-13 09:01:28
Michael Kay schrieb:
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.

Bizarre historical reasons is exactly what I'm interested in! Quite
often, they don't find entrance in the documentation, but live on only
in anecdotal camp fire talk. I'd be glad if any of the few people who
remember could point out what these reasons are.

At first, I found it odd that a simple integer value did not qualify for
ID-ness as per the XML spec. Then, becoming aware of the fact that there
is only one ID table per document, I realized it is a useful convention
to *prefix* ID values according to the type of object they refer to, the
prefix stepping in as a substitute for the table, so that there can be
an object HH123 but also BB123. This is when the restriction mentioned
above stopped bothering me.

--
Michael Ludwig

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--