[xsd-users] Limiting field sizes when serializing to DOM documents

Matt Burnham matt.burnham.ctr at mhpcc.hpc.mil
Thu Jul 12 18:35:06 EDT 2007


Boris,

Boris Kolpackov wrote:
> I assume you want to get something like version="2.0" in your XML
>   
Correct.
> instance. The XSD runtime uses the standard ostream insertion
> operator for long double (that is what xsd:decimal is mapped to by
> default in 2.x.y series). While the result depends on the particular
> implementation of the C++ runtime, I am surprised you get this number
> of trailing zeros for 2.0, assuming, of course, the actual value is
> 2.0, and not something like 2.0000000000000000000000001. Can you
> confirm that you indeed serialize 2.0? Also which version of XSD are
> you using?
>   
We're using version 2.2.0 on VS 2003 (VC 7.1).

Most of the other attributes are also xsd:decimal and all of them have 
24 decimal places (mostly trailing zero's).

I have a "version" variable (I've tried double, float, and int) that I 
use when creating my cxx-tree objects, then I serialize it.






More information about the xsd-users mailing list