[xsd-users] Double trouble
boris at codesynthesis.com
Sun Jan 20 03:57:17 EST 2008
Esben Skovenborg <EsbenS at TCElectronic.com> writes:
> I think it would be most natural to map xsd:double to C++ double, as in
> your "even better solution", below. What would I need to do?
Ok, I've added the necessary support to the compiler. The pre-release
binary is here (I assumed you are using Windows):
I've also create an example that shows how to re-map xsd:double and
It implements serialization of xsd:double in scientific notation.
There is the README file that explains what's going on. When adopting
to your application, you would replace test.xsd with your own schema
and change the code in *-parsing.hxx and *-serialization.hxx if
necessary (e.g., you may want to set your own precisions, etc.).
> A related issue is the handling of +/-INF and NaN 'special values' of
> xsd:double elements (http://www.w3.org/TR/xmlschema-2/#double). Will
> these values be supported by the XSD 3.1 serializer? and by the parser?
Yes, they are supported by the pre-release and the custom-double example.
More information about the xsd-users