I wrote a simple XSD where I wrote the following XSD template
<xsd:element name="xx"> <xsd:simpleType > <xsd:restriction base="xsd:string"> <xsd:pattern value="^[az]+"> </xsd:pattern> </xsd:restriction> </xsd:simpleType> </xsd:element>
When I perform XML-XSD validation using jaxb, the XX tag error always occurs. eg:
<xx>abcd</xx>
I donβt know why this is strange behavior? I hope that my regular expression is correct, and the above example should pass the test. Did I miss something?
source share