[xsd-users] xs:double truncation
Aaron Bray ARA/SED
abray at ara.com
Fri Jun 20 17:08:00 EDT 2008
Ok, I figured it out, I am not sure how this works (there is explanation
on your wiki, but it still hurts my head...)
xsd.exe cxx-tree --generate-serialization --generate-ostream
--generate-default-ctor --custom-type double=double --custom-type
"decimal=long double" --hxx-epilogue-file xml-schema-epilogue.hxx
--export-symbol __declspec(dllexport) --extern-xml-schema nucs-schema
--generate-xml-schema nucs-schema
I was not using the --generate-xml-schema command to generate the file
--extern-xml-schema wanted
It may be worth adding these two commands to your earlier referenced zip
example README in the compile options
All is well
Thank you for the help!
Aaron Bray
-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Friday, June 20, 2008 2:39 PM
To: Aaron Bray ARA/SED
Cc: xsd-users at codesynthesis.com
Subject: Re: [xsd-users] xs:double truncation
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