W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2008

RE: Question about number types

From: Michael Kay <mike@saxonica.com>
Date: Wed, 2 Jul 2008 20:29:06 +0100
To: "'Alan Ruttenberg'" <alanruttenberg@gmail.com>, <www-xml-schema-comments@w3.org>
Message-ID: <A59BDE22ED1A4FD891EE0A69B67144B6@Sealion>

> Was there at any point explicit rejection of have a 
> mathematical real number datatype (possibly augmented with 
> some constants such as INF, -
> INF) from which the rest of the numeric types were defined by 
> restriction?

I don't know, but the XQuery/XSLT specs got around the problems, so it's not
impossible. The "type" called "numeric" in the QT specs is not really a
genuine data type, it's more of a specification macro, but all the numeric
operations in QT allow the three primitive numeric types to be mixed.

If you want to define operations based on the XML Schema datatypes, I would
strongly suggest using the operations defined in XQuery/XSLT Functions and

Michael Kay

> We have a discussion going in the OWL working group, part of 
> which is about the desirability of comparing a float to an 
> integer. If they are disjoint, then that doesn't seem 
> possible. However, it seems well defined to ask whether 
> "2.1"^^xsd:float > "2"^^xsd:int
> Thanks,
> Alan
Received on Wednesday, 2 July 2008 19:29:46 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:08 UTC