Choices of attributes

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

    Choices of attributes

    How do I to define a tag wit two attributes that
    are mutually exclusive?

    So I want the tag to look like this:
    <COM:descriptio n choice1="blah">
    or
    <COM:descriptio n choice2="blahbl ah">

    BUT NOT
    <COM:descriptio n choice1="blah" choice2="blahbl ah">
  • David Carlisle

    #2
    Re: Choices of attributes

    montana@ccs.neu .edu (Tony) writes:
    [color=blue]
    > How do I to define a tag wit two attributes that
    > are mutually exclusive?
    >
    > So I want the tag to look like this:
    > <COM:descriptio n choice1="blah">
    > or
    > <COM:descriptio n choice2="blahbl ah">
    >
    > BUT NOT
    > <COM:descriptio n choice1="blah" choice2="blahbl ah">[/color]

    What language do you want to use to make the definition?
    XML DTD and W3C XML schema can not express that constraint.
    You can express it in Relax NG or schematron for example.

    David

    Comment

    Working...