W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2001

RE: Restricting decimals

From: <Mike_Leditschke@nemmco.com.au>
Date: Mon, 3 Dec 2001 13:44:07 +1000
To: "Ashok Malhotra" <ashokma@microsoft.com>
Cc: ht@cogsci.ed.ac.uk, xmlschema-dev@w3.org
Message-ID: <OF48E6FA84.B2290BD3-ON4A256B17.001438DE@nemmco.com.au>

Hi Ashok/Henry.

Following some private email from another list member, I had
arrived at the definition you give below with the exception
that minExclusive = "0". It has helped improve my
understanding of lexical vs values spaces.

Thanks for the help.


                    Malhotra"            To:     "Henry S. Thompson" <ht@cogsci.ed.ac.uk>                                               
                    <ashokma@micr        cc:     <Mike_Leditschke@nemmco.com.au>, <xmlschema-dev@w3.org>                                
                    osoft.com>           Subject:     RE: Restricting decimals                                                          
                    03:27 AM                                                                                                            

The restriction he wanted was two digits before the decimal point
and two after.  Your solution does not restrict the digits after
the decimal point.

The following would work:

<simpleType name='myDecimal'>
     <restriction base='decimal'>
       <fractionalDigits = '2'/>
       <maxExclusive value='100'/>
       <minExclusive value='-100'/>

All the best, Ashok
Ashok Malhotra              <mailto: ashokma@microsoft.com>
Microsoft Corporation

-----Original Message-----
From: Henry S. Thompson [mailto:ht@cogsci.ed.ac.uk]
Sent: Friday, November 30, 2001 8:54 AM
To: Ashok Malhotra
Cc: Mike_Leditschke@nemmco.com.au; xmlschema-dev@w3.org
Subject: Re: Restricting decimals

"Ashok Malhotra" <ashokma@microsoft.com> writes:

> You need a pattern to restrict the lexical form.  Try something like:
> <simpleType name='myDecimal'>
>     <restriction base='decimal'>
>       <pattern value='\d{2}.\d{2}'/>
>     </restriction>
> </simpleType>

Sorry if this is a misunderstanding, but surely

 <simpleType name='myDecimal'>
     <restriction base='decimal'>
       <maxExclusive value='100'/>
       <minExclusive value='-100'/>

would be somehow more appropriate?

  Henry S. Thompson, HCRC Language Technology Group, University of
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
               Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
                          URL: http://www.ltg.ed.ac.uk/~ht/

This e-mail is confidential.  If you are not the intended recipient, any use, disclosure or copying of this document is unauthorised and prohibited.  If you have received this document in error, please delete the email and notify me by return email or by phoning the NEMMCO Helpdesk on 1300 300 295.
Received on Sunday, 2 December 2001 22:45:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:56 UTC