restriction of an Element which can be empty in Schema Posted May 22, 2020 Hi, I do Need to restrict an xs:element like the following: <xs:restriction base="xs:string"> <xs:pattern value="[0-9]{9}"></xs:pattern> </xs:restriction> But I have to allow, that it is may empty. The following is not working: <xs:restriction base="xs:string"> <xs:pattern value="[0-9]{0|9}"></xs:pattern> </xs:restriction>
restriction of an Element which can be empty
in Schema
Posted
Hi,
I do Need to restrict an xs:element like the following:
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{9}"></xs:pattern>
</xs:restriction>
But I have to allow, that it is may empty.
The following is not working:
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{0|9}"></xs:pattern>
</xs:restriction>