Mega Code Archive

 
Categories / XML Tutorial / XML Schema
 

When the values of a union datatype are validated, theyre validated in the order in which theyre defined

<!-- schema --> <xsd:element name="dog">   <xsd:simpleType>    <xsd:union>     <xsd:simpleType>     <xsd:restriction base="nonNegativeInteger"/>    </xsd:simpleType>    <xsd:simpleType>    <xsd:restriction base="string"/>    </xsd:simpleType>   </xsd:union>   </xsd:simpleType>  </xsd:element> <!-- instance document --> <dog>15</dog> <dog>hound</dog>