When the result of a calculation involving xs:decimal
numbers is zero, it is possible that when converted to
a string, the result is displayed with multiple zeros
(for example "00" or "000"). This happens on JDK 1.5
when the underlying computation produces a BigDecimal
value with integer value = 0 and a negative scale. It
does not happen on JDK 1.4, because there Saxon
normalizes the value itself; on 1.5 it relies on the
stripTrailingZeros method in the BigDecimal class,
which does not deal with this case.
An example is the XQTS test case
fn-seconds-from-dateTime-13 which does the calculation:
The problem affects Saxon 8.8; it is also likely to
affect earlier releases though this has not been checked.
A source patch will be placed in Subversion. It affects
module DecimalValue in package net.sf.saxon.value.