You can't define that in XML Schema. What you can do is define the
following:
<personID value="secure-card"/>
<personID value="thumb-print"/>
<lengthUnit value="inch"/>
<lengthUnit value="cm"/>
using the following schema:
<xs:element name="personID">
<xs:complexType>
<xs:attribute name="value" type="personAtt"/>
</xs:complexType>
</xs:element>
<xs:element name="lengthUnit">
<xs:complexType>
<xs:attribute name="value" type="lengthAtt"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="personAtt">
<xs:restriction base="xs:string">
<xs:enumeration value="secure-card"/>
<xs:enumeration value="thumb-print"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="lengthAtt">
<xs:restriction base="xs:string">
<xs:enumeration value="inch"/>
<xs:enumeration value="cm"/>
</xs:restriction>
</xs:simpleType>
--
Stan Kitsis
Program Manager, XML Technologies
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"ocelka" <oc****@ics.muni.cz> wrote in message
news:2b**************************@posting.google.c om...
I need know how define xml schema for this xml fragment:
<set name="person-id" value="secure-card"/>
<set name="person-id" value="thumb-print"/>
<set name="length-unit" value="inch"/>
<set name="length-unit" value="cm"/>
so if name="person-id", then value can contain only one of value
"secure-card","thumb-print".
if name="length-unit", then value can contain only one of value
"inch","cm"