Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > how to define a key which generates unique sequence number?

Reply
Thread Tools

how to define a key which generates unique sequence number?

 
 
XML fellow
Guest
Posts: n/a
 
      10-03-2008


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 ***
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      10-03-2008
XML fellow wrote:

> 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/
 
Reply With Quote
 
 
 
 
XML fellow
Guest
Posts: n/a
 
      10-03-2008


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 ***
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Is there a unique method in python to unique a list? Token Type Python 9 09-09-2012 02:13 PM
list question... unique values in all possible unique spots ToshiBoy Python 6 08-12-2008 05:01 AM
Which destructor is called in which sequence at the end of the main program? Mark Sullivan C++ 0 12-21-2007 06:48 AM
BOOT SEQUENCE (how to change boot sequence) bird Computer Support 13 12-24-2003 02:20 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57