XML Datatype clarification: fractionDigits
Nochum Klein <[email protected]> Fri, 21 Jun 2013 18:05:59 +0000
| Newsgroups | gmane.text.xml.schema.devel |
|---|---|
| Message-ID | <[email protected]> |
--_000_7198892DC6DB9E42A1D4AF29D6F35CB776784801PAMBX01natibcoc_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I was hoping to get some clarification regarding the use of <xsd:fractionD=
igits value=3D"0"/>. My understanding of the specification is that there m=
ust 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 supporte=
d 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 add=
resses this with lexical-canonical mappings. However assume that a WSDL co=
ntains 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 repr=
esentation that would be compatible with the restriction?
Most grateful for your insights on this.
Sincerely,
Nochum Klein
--_000_7198892DC6DB9E42A1D4AF29D6F35CB776784801PAMBX01natibcoc_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html dir=3D"ltr">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style id=3D"owaParaStyle" type=3D"text/css">=0A=
<!--=0A=
p=0A=
{margin-top:0;=0A=
margin-bottom:0}=0A=
-->=0A=
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi=3D"0" fpstyle=3D"1">
<div style=3D"direction: ltr;font-family: Arial;color: #000000;font-size: 1=
0pt;">I was hoping to get some clarification regarding the use of <=
;xsd:fractionDigits value=3D"0"/>. My understanding of t=
he 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 fractionD=
igits is set to zero, the resulting value can only be supported in a lexica=
l representation of the "xsd:decimal" data type (e.g. 1),
but not the canonical one (which requires 1.0). I understand that th=
e spec addresses this with lexical-canonical mappings. However assume=
that a WSDL contains a restriction for zero fractionDigits. If a val=
ue 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 compa=
tible with the restriction?<br>
<div style=3D"font-family: Times New Roman; color: #000000; font-size: 16px=
">
<div>
<div style=3D"direction:ltr; font-family:Arial; color:#000000; font-size:10=
pt"><br>
Most grateful for your insights on this.<br>
<br>
Sincerely,<br>
<br>
Nochum Klein<br>
</div>
</div>
</div>
</div>
</body>
</html>
--_000_7198892DC6DB9E42A1D4AF29D6F35CB776784801PAMBX01natibcoc_--