Re: LC-187: Type hierarchy for numerics

Paul,

Thank you for your comments.  I recognize and acknowledge the reasons you 
give, with which I have varying degrees of sympathy.  Rather than argue any 
specific point, I would like to put to the group a request for guidance, 
which is grounded in a real issue.

The problem concerns construction of certain descriptions in RDF.  It is my 
expectation that parts the XML schema data type system will be adopted for 
RDF (which is less bound to character-based data representations than XML).

For the purposes of this request, it is axiomatic that compatibility with 
existing work requires that we be able to represent rational numbers, which 
might have divisor components that preclude finite decimal representation 
(e.g. 1/3).  Further, we wish to be able to treat them with the same kind 
of ways as other "primitive" data types, especially numerics (e.g. 
comparison, ordering, treatment as an atomic entity, representation within 
a single literal).

Can you suggest (in outline) how you feel this is best accomplished using 
the current XML schema framework?

Thank you for your attention,

#g
--

At 02:47 PM 10/12/00 -0700, Biron,Paul V wrote:
>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

------------
Graham Klyne
(GK@ACM.ORG)

Received on Friday, 13 October 2000 11:52:06 UTC