First off I know asking "Why" for anything standards related is silly.
But given that, could anyone give me a rationale or history for restricting xml:id (or the ID type from DTD) to be NCName which then has to start with non-numeric ?
It seems such an *obvious* (to me!) concept that an ID could be fully numeric like xml:id="12345".
Why force it to start with a letter like xml:id="a123" (or a DTD or schema ID value'd attribute like id="12345" )
I know I can fairly easily add such a letter, then hack all the queries to prepend the letter ... but I'm very curious why the constraint ? I would guess a great deal of ID's 'in the wild' are purely numeric.
Use Case: Why I'm asking is that I have a large number of documents which are effectively dumps from a database.
Each element has a 'natural ID' which is the integer primary key from the database.
I'm trying to optimize XQuery & xslt to use the built-in indexing in common engines which supports "ID" values via fn:id() and have discovered to my surprise I simply cant use numeric values for an ID. Quite curious.
-David
----------------------------------------
David A. Lee
dlee@c...
http://www.xmlsh.org