Jens U Posted May 22, 2020 Share 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> Link to comment Share on other sites More sharing options...
Ingolme Posted May 22, 2020 Share Posted May 22, 2020 This pattern should work: ([0-9]{9})? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now