A choice equivalent for attributes

Discussion in 'XML' started by En., Nov 1, 2005.

  1. En.

    En. Guest

    Hi,

    How can I define in XML Schema something like this

    <object attr1="" or attr2=""/>

    I want have object that have only one attribute: attr1 or attr2.

    thanks
     
    En., Nov 1, 2005
    #1
    1. Advertising

  2. En. wrote:

    > How can I define in XML Schema something like this
    >
    > <object attr1="" or attr2=""/>
    >
    > I want have object that have only one attribute: attr1 or attr2.


    You can't model such constraints between attributes with the W3C XSD
    schema language.


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Nov 1, 2005
    #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. Mickey Segal
    Replies:
    0
    Views:
    904
    Mickey Segal
    Feb 2, 2004
  2. Hauke Fuhrmann

    choice between two attributes (schema)

    Hauke Fuhrmann, Oct 25, 2003, in forum: XML
    Replies:
    0
    Views:
    394
    Hauke Fuhrmann
    Oct 25, 2003
  3. Replies:
    3
    Views:
    1,197
  4. Max
    Replies:
    1
    Views:
    488
    Joe Kesselman
    Sep 22, 2006
  5. miles.jg
    Replies:
    16
    Views:
    889
    Alf P. Steinbach
    Nov 14, 2007
Loading...

Share This Page