469,330 Members | 1,285 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,330 developers. It's quick & easy.

Validation for non zero value in element

I have an XSD that is used to validate an XML stream. One of the elements of data cannot contain a zero or the processing must reject it outright. I would like the validation to be able to flag this as not valid so it never gets to my program. Can the XSD:element or another descriptor contain something that says that zero (and/or null) is not an allowed value in the data?
Mar 19 '07 #1
2 1122
117 100+
may be this pattern help you.

[html]<xs:element name="xxx">
<xs:restriction base="xs:integer">
<xs:pattern value="[1-9][1-9][1-9][1-9][1-9]"/> //-- you can increase that
Mar 20 '07 #2
839 Expert 512MB
Did you succeed to solve the problem ?
If yes, please let me know, in order to close the thread.
Mar 21 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Dan | last post: by
10 posts views Thread by dries | last post: by
3 posts views Thread by paul | last post: by
7 posts views Thread by Ryan Ternier | last post: by
4 posts views Thread by martialtiger | last post: by
11 posts views Thread by Rik | last post: by
6 posts views Thread by lists | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.