ID unique to this type of element?

Discussion in 'XML' started by Robert William Vesterman, Dec 19, 2004.

  1. Is there a way to specify an attribute as being sort of like an ID,
    except that it has to be unique to this type of element rather than
    unique within the document?

    Or, more pleasantly, unique within the parent element's children?

    Or, especially pleasantly, unique within the parent element's children
    of the same element type?

    Thanks,

    Bob Vesterman.
     
    Robert William Vesterman, Dec 19, 2004
    #1
    1. Advertisements

  2. Robert William Vesterman wrote:

    > Is there a way to specify an attribute as being sort of like an ID,
    > except that it has to be unique to this type of element rather than
    > unique within the document?
    >
    > Or, more pleasantly, unique within the parent element's children?
    >
    > Or, especially pleasantly, unique within the parent element's children
    > of the same element type?


    A DTD doesn't allow that but a W3C XML schema does:
    http://www.w3.org/TR/xmlschema-0/#specifyingUniqueness

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Dec 20, 2004
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ulf Heyder
    Replies:
    1
    Views:
    637
    Patrick TJ McPhee
    Oct 28, 2003
  2. Chishun Kwong
    Replies:
    0
    Views:
    551
    Chishun Kwong
    Mar 3, 2005
  3. Mike
    Replies:
    1
    Views:
    508
  4. Aray
    Replies:
    1
    Views:
    706
  5. Arndt Jonasson
    Replies:
    2
    Views:
    544
    Arndt Jonasson
    Feb 12, 2007
  6. HANM
    Replies:
    2
    Views:
    1,527
    Joseph Kesselman
    Jan 29, 2008
  7. ToshiBoy
    Replies:
    6
    Views:
    1,121
    ToshiBoy
    Aug 12, 2008
  8. Token Type
    Replies:
    9
    Views:
    564
    Chris Angelico
    Sep 9, 2012
Loading...