Jump to content

restriction of an Element which can be empty


Jens U

Recommended Posts

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>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...