I need an xml scheme that checks empty node and node with 8 digits for true. Therefore, I defined an XML schema with the following simple type:
<xs:simpleType name="LeererStringOder8Zeichen">
<xs:restriction base="xs:string">
<xs:pattern value="(^$|\d{8})"/>
</xs:restriction>
</xs:simpleType>
I tried this regex using java.util.regex and the Xerces inner class RegularExpression. Both have returned. But when I use this simple type in my WS (implemented using CXF), I get a validation error when I send an empty string (e.g.). What for? Does anyone know how to change my scheme so that it accepts an empty tag and a tag containing 8 digits?
Thanks for the help, Andreas
source
share