[xsd-users] Total Digits

Tolonen, Petteri petteri.tolonen at logica.com
Tue Sep 1 02:33:58 EDT 2009


Hi,

I have a problem with Total Digits restriction... I think it should work differently.

Here is part of my schema:

<xsd:element name="XXXDecimal">
  <xsd:simpleType>
    <xsd:restriction base="xsd:decimal">
      <xsd:totalDigits value="14"/>
      <xsd:fractionDigits value="3"/>
      <xsd:minInclusive value="-99999999999.999"/>
      <xsd:maxInclusive value="99999999999.999"/>
    </xsd:restriction>
  </xsd:simpleType>
</xsd:element>

Positive decimals work nicely, but i can't output negative -99999999999.999 value because totalDigits cuts one digit from the end result is -99999999999.99
I am pretty sure that totalDigits shouldn't take the minus sign in count of digits. Xerces validates both -99999999999.999 as OK.

I think this is bug in XSD

Platform information:
Redhat
xsd-3.2.0-1.x86_64
xerces-c_2_8_0-x86_64


Petteri Tolonen





More information about the xsd-users mailing list