Given the following XML:
<category>1000</category>
<type>a</type>
And this XSD for validation:
<xs:element name="category" type="categoryType"/>
<xs:element name="type" type="xs:string">
<xs:simpleType name="categoryType">
<xs:restriction base="xs:string">
<xs:enumeration value="1000"/>
<xs:enumeration value="1010"/>
<xs:enumeration value="1020"/>
<xs:enumeration value="1030"/>
<xs:enumeration value="1040"/>
</xs:restriction>
</xs:simpleType>
How can I check the type value if:
- type = a (avaliable in category: all)
- type = b (avaliable in category: 1000,1020,1030)
- type = c (avaliable in category: 1000,1010,1030,1040)
- type = d (avaliable in category: 1000,1010,1020,1030)