[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Why cant xml:id be numeric only ?

  • From: "David Lee" <dlee@calldei.com>
  • To: <xml-dev@lists.xml.org>
  • Date: Fri, 29 Apr 2011 10:22:48 -0400

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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.