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

Re: Restricting decimals

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 30 Nov 2001 16:53:31 +0000
To: "Ashok Malhotra" <ashokma@microsoft.com>
Cc: <Mike_Leditschke@nemmco.com.au>, <xmlschema-dev@w3.org>
Message-ID: <f5bd720ryic.fsf@cogsci.ed.ac.uk>
"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'/>
     </restriction>
 </simpleType>

would be somehow more appropriate?

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          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/
Received on Friday, 30 November 2001 11:53:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:35 GMT