how to define a key which generates unique sequence number?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • XML fellow

    #1

    how to define a key which generates unique sequence number?



    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

    #2
    Re: how to define a key which generates unique sequence number?

    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


    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/

    Comment

    • XML fellow

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

      Comment

      Working...