Connecting Tech Pros Worldwide Help | Site Map

how to define a key which generates unique sequence number?

  #1  
Old October 3rd, 2008, 09:05 AM
XML fellow
Guest
 
Posts: n/a


hi,
i would like to define a unique key in the XSD, and once generating a
default XML out of it (using XSD2INST tool), the XML will automaticaly
be populated with a unique sequence number.

similar to defining a sequence number in DB.

can anyone advise how to do that?

thanks :-)


*** Sent via Developersdex http://www.developersdex.com ***
  #2  
Old October 3rd, 2008, 12:05 PM
Martin Honnen
Guest
 
Posts: n/a

re: how to define a key which generates unique sequence number?


XML fellow wrote:
Quote:
i would like to define a unique key in the XSD, and once generating a
default XML out of it (using XSD2INST tool), the XML will automaticaly
be populated with a unique sequence number.
>
similar to defining a sequence number in DB.
>
can anyone advise how to do that?
A key is defined with the xs:key element and its child elements
xs:selector and xs:field, see
http://www.w3.org/TR/xmlschema-0/#sp...ysAndtheirRefs

Whether that tool you mention is then able to generate keys I don't
know. You might want to check its documentation or find out whether
there is a support forum or mailing list.


--

Martin Honnen
http://JavaScript.FAQTs.com/
  #3  
Old October 3rd, 2008, 12:15 PM
XML fellow
Guest
 
Posts: n/a

re: how to define a key which generates unique sequence number?




thanks :-)
I'm familiar with the Key/Key-ref items.
my question relates more to the 'sequence' issue. when you define
selector it relates to some pre-defined key. i need this key to be a
sequence, i.e. i++ each time it's being used.

*** Sent via Developersdex http://www.developersdex.com ***
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 04:15 AM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 11:37 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 09:56 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 03:15 AM