9
I am defining a simpleType that has a restriction to either be a value from an enumeration or a value matching a pattern. I realize I can do it all from the pattern but I want to have the picklist that the enumeration provides.
This is what I expected to be able 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 that fails since a value can't match both constraints. If I modify the pattern to allow for any enumerated value then it will fail it if only matches the pattern.