I determine simpleTypewhich restrictionhas either a value from enumerationor a value corresponding to a pattern. I understand that I can make it all out pattern, but I want a list of choices that provides enumeration.
This is what I expected to do:
<xs:simpleType name="both">
<xs:restriction base="xs:string">
<xs:enumeration value="one" />
<xs:enumeration value="two" />
<xs:pattern value="[0..9]+" />
</xs:restriction>
<xs:simpleType>
But this fails because the value cannot meet both restrictions. If I modify the pattern to allow any enumerated value, it will fail if it matches only the pattern.
source
share