[xsde-users] invalid #include statements in generated code

Boris Kolpackov boris at codesynthesis.com
Mon Nov 10 04:50:27 EST 2014

Hi Christian,

Christian Sell <christian at gsvitec.com> writes:

> xsde cxx-hybrid --output-dir gen --generate-parser --generate-aggregate
> --generate-polymorphic --generate-serializer --no-long-long schema/viewmodel.xsd
> schema/vmf.xsd schema/amf.xsd schema/odb.xsd
> I get code that has include statements of the following form
> #include "schema/odb_xx.h"

You get this schema/ prefix because the corresponding import directive
also contains this prefix (e.g., it looks something like "schema/odb.xsd").
By default XSD/e keeps these prefixes since that would make everything
work out of the box for multi-directory schemas if the code is generated
next to the schemas. Sometimes, however, this is not what the user wants
and for such cases there is the --include-regex option that allows you
to transform the include directives in any way you want. The example in
the manual does pretty much exactly what you would want:



More information about the xsde-users mailing list