[xsd-users] Custom Types
Boris Kolpackov
boris at codesynthesis.com
Mon May 23 13:23:16 EDT 2011
Hi Klaus,
Ellinger (EXT), Klaus <ellinger.klaus.ext at siemens.com> writes:
> Command to generate:
>
> xsd.exe cxx-tree\
> --root-element catalog\
> --generate-ostream\
> --generate-serialization\
> --output-dir\
> --generate-polymorphic\
> --custom-type "condition=condition_impl<condition_base>/condition_base"\
> --custom-type "extract=extract_impl<extract_base>/extract_base"\
> --generate-forward\
> --fwd-prologue "#include \"Condition-custom_fwd.hxx\""\
> --hxx-prologue "#include \"Condition-custom.hxx\""\
> --output-dir $(XSD_OUTPUT_DIR)\
> $(XSD_INPUT_DIR)\Condition.xsd
If you are using XSD 3.3.0 (or later), you will also need to add the
--polymorphic-type option:
--polymorphic-type condition
See Section 2.11, "Mapping for xsi:type and Substitution Groups" in the
C++/Tree Mapping User Manual for more information on this option:
http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.11
I am pretty sure this is the reason your example doesn't work as expected.
Can you give this fix a try and see if it helps?
Boris
More information about the xsd-users
mailing list