- From: Biron,Paul V <Paul.V.Biron@kp.org>
- Date: Thu, 12 Oct 2000 14:47:55 -0700
- To: "'GK@Dial.pipex.com'" <GK@Dial.pipex.com>
- Cc: "'www-xml-schema-comments'" <www-xml-schema-comments@w3.org>
Dear Graham and members of the XML Schema WG: The W3C XML Schema Working Group has spent the last several months working through the comments received from the public on the last-call draft of the XML Schema specification. We thank you for the comments you made on our specification during our last-call comment period, and want to make sure you know that all comments received during the last-call comment period have been recorded in our last-call issues list (http://www.w3.org/2000/05/12-xmlschema-lcissues). You raised the point registered as issue LC-187, which suggests that XML Schema be modified such that a single primitive numeric datatype, rational numbers, be introduced and that the existing numeric types (float, double and decimal) be derived from rationals. During the evolution of XML Schema Part 2: Datatypes the numeric type hierarchy has undergone many revisions, the end result of which is the hierarchy with decimal, float and double as primitives. The design issues that the WG grappled with during this evolution were many, but can be classified as those pertaining to questions of value space and those pertaining to questions of lexical space. As far as the value space questions (which the WG considered the more import questions), we settled on the current design for a number of reasons. First, the value space of the rational numbers requires representations with infinite precision (e.g., 1/3 is not representable in a finite number of decimal digits) unless notions of symbolic expression evaluation is introduced. The WG made a design decision early on that expression evaluation was out of scope for XML Schema V1. Note also that infinite precision representations are quite different from the arbitrarily large (but finite) precision of our current decimal type. Second, sound arguments were put forward within the WG that floating point numbers are not real numbers (and hence are not rationals). Among the points made were the following: 1) the relationship between the sets of numbers in the floating-point and real value spaces is not trivial, and hence, selecting *semantic* facets that would subset the reals [or rationals] to the value space of float/double would not be easy; 2) floating-point value spaces contain elements that do not belong in the real, decimal, or integer value spaces (e.g., +/- Inf, +/-0 and NaN); The most important lexical space question the WG dealt with was the proper representation of rationals. As much as possible, the WG has tried to create lexical spaces that that a one to one mapping to value spaces. It is true that the cases where this general rule was violated is in the case of the numberic types (e.g., +1 and 1 are both legal literals for the integer 1). The particular cases of lexical variation we allow are all very well controlled (and supported by most existing numeric libraries in common programming languages). However, the prospect of requiring schema processors to recognize that 1/2, 2/4, 3/6, 4/8, etc. are all literals that map to the same value in the value space was felt to be too great of a burden on V1 processors (this is the other side of decision that expression evaluation is out of scope). The upshot is that the WG declined to make the change that you suggested. It would be helpful to us to know whether you are satisfied with the decision taken by the WG on this issue, or wish your dissent from the WG's decision to be recorded for consideration by the Director of the W3C. with best regards, Paul V. Biron Co-editor, W3C XML Schema Part 2: Datatypes
Received on Thursday, 12 October 2000 18:11:59 UTC