Connecting Tech Pros Worldwide Forums | Help | Site Map

how to define a key which generates unique sequence number?

XML fellow
Guest
 
Posts: n/a
#1: Oct 3 '08


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 ***

Martin Honnen
Guest
 
Posts: n/a
#2: Oct 3 '08

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/
XML fellow
Guest
 
Posts: n/a
#3: Oct 3 '08

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