Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: xs:string range 1 to 999

From: "Markus Gamperl" <markus.gamperl@---.-->
To: "Pete Cordell" <petexmldev@--------------.--->, xmlschema-dev@--.---
Date: 5/9/2007 5:58:00 PM
Dear Pete!

In future there should also be allowed 01, 001,... On this type's usage is a xs:unique defined. If I would use an xs:integer the values 01 and 1 would be the same... Therefor we use xs:string from the beginning...

Thanks
Markus

-------- Original-Nachricht --------
Datum: Wed, 9 May 2007 13:01:53 +0100
Von: "Pete Cordell" <petexmldev@t...>
An: "Markus Gamperl" <markus.gamperl@g...>, xmlschema-dev@w...
Betreff: Re: xs:string range 1 to 999

> Hi Markus,
> 
> You could try:
> 
> <xs:pattern value="[1-9][0-9]{0,2}"/>
> 
> I've used [0-9] instead of \d because \d includes numbers from a whole
> bunch 
> of different alphabets that I'm guessing you don't want.  (This 'feature'
> is 
> really a pattern matching/Unicode issue rather than a schema issue.)
> 
> BTW - why don't you want to use an integer type?
> 
> HTH,
> 
> Pete.
> --
> =============================================
> Pete Cordell
> Tech-Know-Ware Ltd
> for XML Schema to C++ data binding visit
>  http://www.tech-know-ware.com/lmx/
>  http://www.codalogic.com/lmx/
> =============================================
> 
> ----- Original Message ----- 
> From: "Markus Gamperl" <markus.gamperl@g...>
> To: <xmlschema-dev@w...>
> Sent: Wednesday, May 09, 2007 12:08 PM
> Subject: xs:string range 1 to 999
> 
> 
> >
> > Dear experts!
> >
> > Do you have an idea how to define a xs:string with the range from 1 to 
> > 999?
> >
> > I tried the following:
> > <xs:simpleType name="type1-999">
> > <xs:restriction base="xs:string">
> > <xs:pattern value="\d{1,3}"/>
> > </xs:restriction>
> > </xs:simpleType>
> >
> > But in my configuration the value 0 is allowed - but I don't want to
> allow 
> > value 0 - du you have an idea?
> >
> > Thanks
> > Markus
> > -- 
> > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> > Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> >
> > 
> 

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

From yongnian.le@i... Thu May 10 08:52:38 2007
Received: from maggie.w3.org ([193.51.208.68])
	by frink.w3.org


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent