XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Why cant xml:id be numeric only ?

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@calldei.com

http://www.xmlsh.org

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS