XML schema attribute dependancies
问题 I'd like to ask if it's possible in XML xsd schema declare dependant attributes... Example: <xsd:simpleType name="packCategories"> <xsd:restriction base="xsd:byte"> <xsd:minInclusive value="0"/> <xsd:maxInclusive value="4"/> </xsd:restriction> </xsd:simpleType> <xs:element name="pack"> <xs:complexType> <!-- elements go here --> <xs:attribute type="packCategories" name="category" use="required"/> <xs:attribute type="xs:string" name="explanation" use="optional"/> </xs:complexType> </xs:element>