[xsd-users] Limiting field sizes when serializing to DOM documents
Boris Kolpackov
boris at codesynthesis.com
Fri Jul 13 09:34:20 EDT 2007
Hi Matt,
Matt Burnham <matt.burnham.ctr at mhpcc.hpc.mil> writes:
> Most of the other attributes are also xsd:decimal and all of them have
> 24 decimal places (mostly trailing zero's).
I did some digging and it appear that this is how the combination of
std::fixed and setprecision() works. We have to use std::fixed because
xsd:decimal cannot be in scientific notation. For the upcoming 3.0.0
release we are going to try to address this issue. If you would like,
I can create a patch against 3.0.0.b2 for you.
Another way to "fix" this, without upgrading XSD, is to change
xsd:decimal to xsd:double or xsd:float. With those types you
shouldn't get any trailing zeros.
hth,
-boris
More information about the xsd-users
mailing list