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

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

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. Sebastian Kerekes

    xsd: unique name element

    Sebastian Kerekes, Nov 2, 2004, in forum: XML
    Replies:
    2
    Views:
    761
    Sebastian Kerekes
    Nov 2, 2004
  2. Mike
    Replies:
    1
    Views:
    433
  3. HANM
    Replies:
    2
    Views:
    698
    Joseph Kesselman
    Jan 29, 2008
  4. ToshiBoy
    Replies:
    6
    Views:
    831
    ToshiBoy
    Aug 12, 2008
  5. Token Type
    Replies:
    9
    Views:
    339
    Chris Angelico
    Sep 9, 2012
Loading...

Share This Page