I’m trying to restrict an attribute element of a schema to be between 3 and 20 characters long, but I’m getting an error saying my RegEx is invalid:
<xs:attribute name="name" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[A-Za-Z]{3,20}" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
Any idea what I’m doing incorrectly here? Specific error is "Range end code point is less than the start end code point"
a-Zis the invalid range, you should use the lowercasezinsteada-zNote that
aascii value is 97 andZis 90 so you were actually defining an interval from 97 to 90 =>end-point code is lower than the start-point code