ISSUE-75

pattern for IEEE754r (floating point numbers)

State:
OPEN
Product:
Advanced
Raised by:
Vladislav Bezrukov
Opened on:
2006-10-19
Description:
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.
Related emails:
  1. ISSUE-75: pattern for IEEE754r (floating point numbers) (from dean+cgi@w3.org on 2006-10-19)
  2. Agenda: XML Schema Patterns for Databinding telcon 24 October 2006 (from paul.downey@bt.com on 2006-10-24)
  3. RE: ISSUE-75: pattern for IEEE754r (floating point numbers) (from paul.downey@bt.com on 2006-11-01)
  4. Agenda: XML Schema Patterns for Databinding telcon 28 November 2006 (from paul.downey@bt.com on 2006-11-26)

Related notes:

No additional notes.