shammyfer
December 30th, 2010, 01:12 PM
Pl consider the below example:
<xs:element name="gender">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs: pattern value="male|female"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Can't we get the same result by writing:
<xs:element name="gender">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="male"/>
<xs:enumeration value="female"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="gender">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs: pattern value="male|female"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Can't we get the same result by writing:
<xs:element name="gender">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="male"/>
<xs:enumeration value="female"/>
</xs:restriction>
</xs:simpleType>
</xs:element>