Hi,
I have a question related to the XML-Schema definition. Is it posible to
define relations between elements? The following is my XML Schema:
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="Country" type="Countries"/>
<xs:element name="USZipCode" type="xs:string"/>
<xs:element name="Adress" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="Countries">
<xs:restriction base="xs:string">
<xs:enumeration value="USA"/>
<xs:enumeration value="FRA"/>
<xs:enumeration value="GER"/>
</xs:restriction>
</xs:simpleType>
Now, if an instance of this Schema, an XML file, contains the country USA in
the element "County" then the element "USZipCode" must also be defined in
the xml file. If the "Country" element is FRA then the "USZipCode" is not
required, and should not be present.
Is it posible to define in the XML Schema such a relation/case ?
Thanks,
George.