[xsd-users] directory hierarchy of c++ hxx cxx files
Boris Kolpackov
boris at codesynthesis.com
Tue Jan 30 09:04:23 EST 2024
LESTRIEZ Thomas <thomas.lestriez at edf.fr> writes:
> I have several xsd files in different directories with a hierarchy.
>
> DIR 1 / xsd1.xsd
> DIR 2/ xsd2.xsd
> DIR 2/ DIR 3/ xsd3.xsd
>
> I would like my hxx cxx keep this hierarchy.
>
> Right now, I have all my cxx hxx generated in the save directory. But
> the includes in the hxx are good (they respect the initial xsd directory
> hierarchy, which is not the final hxx cxx directory hierarchy).
>
> Someone could help me to well configure c++ generation to keep the
> initial xsd directory hierarchy?
There is the --output-dir option that seems like what you are looking
for. From the xsd(1) man page[1]:
--output-dir <dir>
Write generated files to <dir> instead of the current directory.
So perhaps something like this:
xsd ... --output-dir DIR1 DIR1/xsd1.xsd
xsd ... --output-dir DIR2 DIR2/xsd2.xsd
xsd ... --output-dir DIR2/DIR3 DIR2/DIR3/xsd3.xsd
[1] https://codesynthesis.com/projects/xsd/documentation/xsd.xhtml
More information about the xsd-users
mailing list