RE: pattern for range of numbers and one fixed number

Define the type as a union of two types, one of which accepts 11 to 109, the
other of which accepts only 999.

In Schema 1.1 you will be able to say <xs:assert test=". = (11 to 109,
999)"/> (well, you will, if they decide to provide xs:assert on simple types
as well as complex types!)

Michael Kay
http://www.saxonica.com/ 


> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Markus Gamperl
> Sent: 05 March 2007 20:42
> To: xmlschema-dev@w3.org
> Subject: pattern for range of numbers and one fixed number
> 
> 
> Hi.
> 
> I want to define an element which exepts the number 11 until 
> 109 and the number 999.
> 
> The following simple type:
> <xs:simpleType name="intzahl">
>  <xs:restriction base="xs:integer">
>   <xs:minInclusive value="11"/>
>   <xs:maxInclusive value="109"/>
>   ???
>  </xs:restriction>
> </xs:simpleType>
> 
> How to define the pattern for the value 999?
> 
> Thanks
> Markus
> --
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> 

Received on Monday, 5 March 2007 21:55:35 UTC