W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2003

Re: Patterns and Decimal

From: Paul Warren <pdw@decisionsoft.com>
Date: 27 Feb 2003 13:25:12 +0000
To: daniella d <daneladg@yahoo.co.uk>
Cc: xmlschema-dev@w3.org
Message-Id: <1046352312.4260.5.camel@tobol.dsl.local>

On Thu, 2003-02-27 at 10:30, daniella d wrote:
> When I use the patterns bellow the third pattern is ignored. Can
> somebody tell me  why?
> 
> Thank you
> 
> daniella
> 
>    <xsd:simpleType>
>    <xsd:restriction base = "xsd:decimal">
>     <xsd:totalDigits value = "11"/>
>     <xsd:fractionDigits value = "3"/>    
>     <xsd:pattern value = "[0-9][.][0-9]*"/> 
>     <xsd:pattern value = "[1-9][0-9]*[.][0-9]*"/>
>     <xsd:pattern value = "[1-9][0-9]*"/>
>    </xsd:restriction>
>   </xsd:simpleType>

That does what I expect it to when I try it.  That is:

123.00
123
0.123

are all valid.

0123

is invalid.

Is this different from what occurs at your end - if so, what validating
parser are you using.  Otherwise, what are you expecting it to do.

Paul
-- 
Paul Warren, Client Services           DecisionSoft Limited
+44-1865-203192                        http://www.decisionsoft.com
Received on Thursday, 27 February 2003 08:25:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:36 GMT