[xsd-users] error processing multiple schemas at once
Eric Broadbent
Eric.Broadbent at csr.com
Wed Nov 2 13:32:51 EDT 2011
Hi fellow XSD users - I'm new to the community and am hoping to use XSD to generate some parsing code for a schema defining information I need to process.
I ran XSD to generate parsing code for a single schema (defined elsewhere),specifying the "--root-element" option, so that it would generate the test driver.
It generated subset_schema-driver.cxx and .hxx, subset_schema-pskel.cxx and .hxx files just fine.
However I got these errors when I attempted to compile the generated code:
subset_schema-pskel.hxx:465:50: error: shared-types-pskel.hxx: No such file or directory
subset_schema-pskel.hxx:467:50: error: shared-resources-pskel.hxx: No such file or directory
Obviously, the subset_schema.xsd referenced other schemas, so I searched and found this in the archives - in the release notes for 2.3.1 (or something like that)
"The compiler is now capable of translating multiple schemas with one invocation."
So I tried running XSD with multiple schemas:
(same command as I used originally but just added the other schemas on the end)
xsd cxx-parser --show-sloc --force-overwrite --show-anonymous --root-element subset_root --generate-test-driver --generate-print-impl --generate-validation --xml-parser expat subset_schema.xsd shared-types.xsd shared-resources xsd
This time, it didn't appear to accept the "--root-element" option"
xsd: error: unable to generate the test driver without a global element (document root)
Maybe I need to somehow specify it for each schema?
Any assistance would be greatly appreciated - thanks!
EBroadbent
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
More information about the xsd-users
mailing list