Jump to content

restriction of an Element which can be empty

Jens U

Recommended Posts


I do Need to restrict an xs:element like the following:

<xs:restriction base="xs:string">

<xs:pattern value="[0-9]{9}"></xs:pattern>


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>


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...