how to define a key which generates unique sequence number?

X

XML fellow

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 :)
 
M

Martin Honnen

XML said:
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/#specifyingKeysAndtheirRefs

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.
 
X

XML fellow

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top