I am getting error validating with this XML:
XSD
<xs:simpleType name="XYZ">
<xs:restriction base="xs:nonNegativeInteger">
<xs:enumeration value="1">
</xs:enumeration>
<xs:enumeration value="2">
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
XML value :
<XYZ>2</XYZ>
Error
cvc-enumeration-valid: Value '2' is not facet-valid with respect to enumeration '[1]'. It must be a value from the enumeration.
Can anyone please help me to understand the problem? How to resolve it ?