Hi,
I need to implement the following rule:
Element el_1 is defined as follows:
<xs:element name="el_1">
<xs:restriction base="xs:string">
<xs:enumeration value="value1"/>
<xs:enumeration value="value2"/>
<xs:enumeration value="value3"/>
</xs:restriction>
</xs:element>
If in validated XML document el_1 = value1 then I need elements 2 and 3 to
appear, otherwise - 4 and five. Something like:
<xs:choice>
<xs:sequence>
<xs:element name="el_1" with_value="value1"/>
<xs:element ref="el_2"/>
<xs:element ref="el_3"/>
</xs:sequence>
<xs:sequence>
<xs:element name="el_1" with_value!="value1"/>
<xs:element ref="el_4"/>
<xs:element ref="el_5"/>
</xs:sequence>
<xs:choice>
I know that the code above is not valid, what I do not know - how to make it
valid?
Any help is appreciated.