Jump to content

restriction of an Element which can be empty

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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...