W3C home > Mailing lists > Public > public-xsd-databinding@w3.org > November 2006

RE: ISSUE-75: pattern for IEEE754r (floating point numbers)

From: <paul.downey@bt.com>
Date: Wed, 1 Nov 2006 21:32:22 -0000
Message-ID: <2A7793353757DB4392DF4DFBBC95225504BFEFC4@I2KM11-UKBR.domain1.systemhost.net>
To: <public-xsd-databinding@w3.org>

I've added as an example, and I had a stab at creating an XPath
to capture this pattern, though it's not pretty, and might 
not be as constraining as you'd like:

http://www.w3.org/2002/ws/databinding/examples/6/09/PrecisionDecimal/
http://www.w3.org/2002/ws/databinding/patterns/6/09/PrecisionDecimal/

Paul

-----Original Message-----
From: public-xsd-databinding-request@w3.org on behalf of Databinding Issue Tracker
Sent: Thu 10/19/2006 6:05 PM
To: public-xsd-databinding@w3.org
Subject: ISSUE-75: pattern for IEEE754r (floating point numbers)
 


ISSUE-75: pattern for IEEE754r (floating point numbers)

http://www.w3.org/2005/06/tracker/databinding/issues/75

Raised by: Vladislav Bezrukov
On product: Advanced

A programming language supporting the IEEE 754r floating point spec [1]
needs to express this type in terms of XML Schema 1.0 [2].
This type is directly supported by the XML Schema 1.1 as
precisionDecimal [3].

However the databinding tools based on the XML Schema 1.0 lack the
corresponding schema pattern.

Proposal:
To consider the following Schema Pattern for the new floating point
numbers:

<xsd:schema
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:pat="http://www.w3.org/2002/ws/databinding/patterns/6/09/"
       
targetNamespace="http://www.w3.org/2002/ws/databinding/patterns/6/09/">

        <xsd:simpleType name="precisionDecimal">
                <xsd:union>
                        <xsd:simpleType>
                                <xsd:restriction base="xsd:decimal">
                                        <xsd:totalDigits value="16"/>
                                </xsd:restriction>
                        </xsd:simpleType>
                        <xsd:simpleType>
                                <xsd:restriction base="xsd:double"/>
                        </xsd:simpleType>
                        <xsd:simpleType>
                                <xsd:restriction base="xsd:string">
                                        <xsd:enumeration value="NaN"/>
                                        <xsd:enumeration value="-INF"/>
                                </xsd:restriction>
                        </xsd:simpleType>
                </xsd:union>
        </xsd:simpleType>

</xsd:schema>

We are aware that value space of the xsd:double is smaller than
xsd11:precisionDecimal. However we have found nothing better than it.
Any comments are very welcome.
Received on Wednesday, 1 November 2006 21:32:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 18:20:37 GMT