W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2002

float/double: Why no totalDigits or fractionDigits

From: Richard Monson-Haefel <Richard@Monson-Haefel.com>
Date: Thu, 07 Mar 2002 08:52:46 -0600
Message-ID: <3C877EBE.2104B7FC@Monson-Haefel.com>
To: www-xml-schema-comments@w3.org, Paul.V.Biron@kp.org
In XML Schema: Part 2: I noticed that decimal type has the same facets
as float and double but also has two others: totalDigits and
fractionDigits. These seem very useful especially when creating a simple
type for holding currency values (I want it to have 2 decimal points and
not more).  Why are these facets (totalDigits and fractionDigits) not a
part of the float and double built-in type?

Also, are their problems using decimal instead of float or double. Is it
less likely to be properly supported; is it portable?

Thanks in advance,

Richard
--
Richard Monson-Haefel
Author of Java Web Service (Titan Books 2002)
Author of Enterprise JavaBeans, 3rd Edition  (O'Reilly 2001)
Co-Author of Java Message Service (O'Reilly 2000)
http://www.jMiddleware.com
Received on Thursday, 7 March 2002 09:50:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:57 UTC