- From: Mukul Gandhi <gandhi.mukul@gmail.com>
- Date: Tue, 25 Jun 2013 20:15:52 +0530
- To: Nochum Klein <nklein@tibco.com>
- Cc: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
On Fri, Jun 21, 2013 at 11:35 PM, Nochum Klein <nklein@tibco.com> wrote: > I was hoping to get some clarification regarding the use of > <xsd:fractionDigits value="0"/>. I think, doing this on xsd:decimal is perhaps equivalent to using xsd:integer. > My understanding of the specification is that there must be at most the number of specified digits. I agree. Thats what I can understand from spec also. > 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? The spec of xsd:fractionDigits says, "it does not restrict the ·lexical space· directly; a lexical representation that adds non-significant leading or trailing zero digits is still permitted.". My reading of this says, if an input value is 1.0 and xsd:fractionDigits value="0" then this value would be reported as valid, since in this case trailing zero was removed and than validation was done. -- Regards, Mukul Gandhi
Received on Tuesday, 25 June 2013 14:46:40 UTC