Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[XSD] 0:1-Restriction

Status
Not open for further replies.

BigShane

Programmer
May 3, 2007
1
AT
Hi!

My code so far:

Code:
<xs:element name="abc" minOccurs="0" maxOccurs="10">
     <xs:simpleType>
          <xs:restriction base="xs:string">
               <xs:enumeration value="a" />
               <xs:enumeration value="b" />
               <xs:enumeration value="c" />
               <xs:enumeration value="d" />
          </xs:restriction>
     </xs:simpleType>
</xs:element>

I'd like to have a restriction, which doesn't allow to use one of the above enumerations twice.

So, that should be okay:

Code:
<abc>a</abc>
<abc>b</abc>
<abc>d</abc>

This one shouldn't be:

Code:
<abc>[B]a[/B]</abc>
<abc>b</abc>
<abc>[B]a[/B]</abc>

How am I able to have such a restriction? I'm Grateful foy any help :). Greeting, Thomas D.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top