[xsd-users] Require info on using the CodeSynthesis to generate CPP code using multiple XSD files.

Boris Kolpackov boris at codesynthesis.com
Thu Apr 23 08:19:11 EDT 2020


Badari Prasad <badari.hp at gmail.com> writes:

> 1) xsd cxx-tree [...] TS_103_280_v020401.xsd TS_103_221_01_v010601.xsd
> 
> With this command XSD complains about schemaLocation
> 
> TS_103_221_01_v010601.xsd: error: unable to guess which schema to open
> TS_103_221_01_v010601.xsd: info: did you forget to specify schemaLocation
> for import/include?
> 
> To fix this I had to edit TS_103_221_01_v010601.xsd to add schemaLocation.

Yes, traditionally schemas include schemaLocation attributes in their
imports/includes. If it's missing, then fixing the schema to include
it is the only way to overcome this issue. So this is the approach I
would recommend.


> 2) xsd cxx-tree --file-per-type [...]

I would not recommend using the file-per-type mode unless you have
no other choice.



More information about the xsd-users mailing list