[xsd-users] --ordered-type-xxx breaks serialization

killtech at gmx.net killtech at gmx.net
Mon Jan 27 14:52:02 EST 2020


Hi everybody,

I'm using the XSD code generator for reading some complex XML files,
"patch" some data, and store the XML file back.

In order to check the input and the output file, I use the
--ordered-type-all option so that I can use graphical diff tools like
kdiff3.

Up to now, I was just patching some attribute values or the content of
pure text nodes. Everything has been working fine.

Now, I have to extend some element lists (elements with minOccurs="0"
maxOccurs="unbounded") and try to export the XML file again: my new item
is NOT stored.

I've tried various approaches, tried to create empty lists and fill them
afterwords - neither worked.

After two days of trail & error, I started with a new test program (from
your Hello world example) and extended the schema one by one to fulfill
my needs: Everything worked as expected =-O

... until I found out that the compilation of the test program doesn't
use the "--ordered-type-all" option. If I add this option to the
Makefile, the simple test program also fails to store extended lists.

If you need some example code, feel free to contact me.

Hk




More information about the xsd-users mailing list