Subject: | Bug with decimal numbers ending in .00 |
Hi,
I have a schema that includes this type definition:
<xs:simpleType name="DecimalType">
<xs:restriction base="xs:decimal">
<xs:pattern value="[0-9]{1,13}\.[0-9]{0,2}"/>
</xs:restriction>
</xs:simpleType>
This allows for decimal numbers with 0 to 2 digits after the point. Note
that the dot is compulsory.
An instance with a value of 1130.00 gets rejected, as apparently the
number is treated as 1130 (the decimal part gets dropped).
The attached tar file shows the problem.
~> perl ex1.pl
error: string `1130' does not match pattern
(?-xism:^(?:[0-9]{1,13}\.[0-9]{0,2})$) at
{http://www.ebinterface.at/schema/2p0/}Invoice/Tax/VAT/Item/TaxedAmount#facet
I could change the schema, but it appears to be valid, so I assume it's
a bug in either XML::Compile or XML::LibXML.
Thanks
__
mirod
Subject: | bug_with_numbers.tar.gz |
Message body not shown because it is not plain text.