aspose file tools*
The moose likes XML and Related Technologies and the fly likes How use number as ID (usable in IDREF)? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How use number as ID (usable in IDREF)?" Watch "How use number as ID (usable in IDREF)?" New topic

How use number as ID (usable in IDREF)?

Dan Bizman
Ranch Hand

Joined: Feb 25, 2003
Posts: 387
As far as I can tell, the only valid value for xs:ID type is an alphabetic character. Is this correct? Why? Every time I try to use id="1" it tells me that's not a valid type. I believe it can only take an NCName type data which is alphabetic characters. What?! Why would schemas NOT allow numeric IDs? Isn't that 90% of all the IDs everyone uses?
[ March 11, 2003: Message edited by: Dan Bizman ]
Mapraputa Is
Leverager of our synergies

Joined: Aug 26, 2000
Posts: 10065
ID only needs to start from a letter, so you can have IDs like K12345, for example. No idea why such a rule :roll:

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
Dan Bizman
Ranch Hand

Joined: Feb 25, 2003
Posts: 387
Thanks, that's my question as wel. How on earth did it ever make sense to someone to say, "hmmm, let's make it so no one can use an integer or long as an ID. Wouldn't that make our schema so much more powerful?"
I don't get it.
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
Here is one answer for you
I agree. Here's the link:
subject: How use number as ID (usable in IDREF)?
Similar Threads
Get data by Matching ID's from two different XML documents
How to represent a sequence in oracle in HQL
Passing check box value to servlet.
jstl request parameter
Check to see if a String contains words only?