[xsd-users] Question about code synthesis C++/Tree : serialization and XSD patterns

LA FATA, Anael anael.la-fata at capgemini.com
Tue Sep 27 04:24:55 EDT 2016


Hello,

I am currently using code synthesis C++/Tree to create an XML document consistent with a given XSD schema.

I could generate without any problem the set of C++ classes with the corresponding serialization methods.

The issue I have got is that my XSD file defines patterns for float members such as : "<xs:pattern value="[0-9]\.[0-9]{2}"/>"
But in the string stream I get by using the generated serialization method, those patterns are not respected.
For instance I will get "0.3" instead of "0.30" for the latest pattern example.

Is there any way to force the generated serialization method to be compliant with the XSD constraints patterns ?

Best regards,

Anaël La Fata

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.


More information about the xsd-users mailing list