Just noticed that you had mentioned it is 1 to 9999, then in that case
the minInclusive should read:
<xs:minInclusive value="1"/>

On Dec 21, 3:57 pm, KP <[email protected]> wrote:
> Not sure why your maxInclusive is set to 4. Anyways, I remember facing
> this issue before. Try if this works out:
>
>       <xs:simpleType name="nonNegativeIntegerAndNull">
>             <xs:union>
>                   <xs:simpleType>
>                         <xs:restriction base="xs:nonNegativeInteger">
>                               <xs:minInclusive value="0"/>
>                               <xs:maxInclusive value="9999"/>
>                         </xs:restriction>
>                   </xs:simpleType>
>                   <xs:simpleType>
>                         <xs:restriction base="xs:string">
>                               <xs:length value="0"/>
>                         </xs:restriction>
>                   </xs:simpleType>
>             </xs:union>
>       </xs:simpleType>
>
> On Dec 21, 3:32 pm, rbr <[email protected]> wrote:
>
>
>
> > Hello,
>
> > For some reason i am having a hard time coming-up with a restriction
> > on a custom data type that must accept an integer between 1 and 9999.
> > Or, alternately, it could be empty. The following definition is
> > throwing a validation error on empty tags.
>
> >     <xs:restriction base="xs:nonNegativeInteger">
> >       <xs:minInclusive value="0" />
> >       <xs:maxInclusive value="4" />
> >     </xs:restriction>
>
> > What am I missing?
>
> > Thank you very much in advance!- Hide quoted text -
>
> - Show quoted text -

Reply via email to