[xsd-users] xs:double truncation

Boris Kolpackov boris at codesynthesis.com
Fri Jun 20 14:38:46 EDT 2008


Hi Aaron,

Aaron Bray ARA/SED <abray at ara.com> writes:

> I have converted over to using the provided examples for double and
> decimal parsing and serialization
> It seems they are conflicting one another in definitions though.
> What would the correct way to remedy this situation?
> 
> double-parsing.hxx(37) : error C2953: 'xsd::cxx::tree::traits<double,C>'
> : class template has already been defined
> 1>        
> c:\program files\codesynthesis xsd
> 3.1\include\xsd\cxx\tree\parsing\double.hxx(28) : see declaration of
> 'xsd::cxx::tree::traits<double,C>'

The double.hxx file shouldn't be included by the generated code
if you are customizing the xsd:double and xsd:decimal types. I
think one of the two things happen:

1. You don't have the following options when generating xml-schema.hxx
   (in which case double.hxx will be included by xml-schema.hxx)

   --custom-type double=double 
   --custom-type "decimal=long double"

2. You don't have the following option when compiling some of your
   schemas (in which case double.hxx will be included by the
   generated header files for those schemas):

   --extern-xml-schema xml-schema.xsd

Can you check if any of this is happening? If not, can you search
the generated code to see which file(s) include double.hxx?

Boris




More information about the xsd-users mailing list