W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2013

XML Datatype clarification: fractionDigits

From: Nochum Klein <nklein@tibco.com>
Date: Fri, 21 Jun 2013 18:05:59 +0000
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <7198892DC6DB9E42A1D4AF29D6F35CB776784801@PA-MBX01.na.tibco.com>
I was hoping to get some clarification regarding the use of  <xsd:fractionDigits value="0"/>.  My understanding of the specification is that there must be at most the number of specified digits. Therefore if it's zero then there MUST be zero digits (and "1.0" should be represented as "1").  Where the fractionDigits is set to zero, the resulting value can only be supported in a lexical representation of the "xsd:decimal" data type (e.g. 1), but not the canonical one (which requires 1.0).  I understand that the spec addresses this with lexical-canonical mappings.  However assume that a WSDL contains a restriction for zero fractionDigits.  If a value of "1.0" is input, should the input be rejected as it is incompatible with the restriction, or should it be accepted since there is a valid mapping to a canonical representation that would be compatible with the restriction?

Most grateful for your insights on this.


Nochum Klein
Received on Saturday, 22 June 2013 12:12:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:22 UTC