'XSD schema multiple choice value
In my xsd schema I have enumeration for status field and if I have value like "New" or "Cancelled" it's correct.
But sometimes I wan't to mix this values and I have status like this "New,Cancelled"
It's possible to handle this issue using only schema xsd without changes in application code ?
<element name="status" type="tns:TStatus" maxOccurs="1"
minOccurs="0" />
<element name="scheduledDate" type="dateTime" maxOccurs="1"
minOccurs="0">
</element>
</sequence>
</complexType>
<simpleType name="TStatus">
<restriction base="string">
<enumeration value="New"></enumeration>
<enumeration value="Cancelled"></enumeration>
<enumeration value="Completed"></enumeration>
<enumeration value="Suspended"></enumeration>
</restriction>
</simpleType>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
