[xsde-users] Re: error: unable to generate the test driver without a unique document root

Boris Kolpackov boris at codesynthesis.com
Tue Jan 15 08:07:00 EST 2013


Hi Ted,

In the future, please send questions about XSD/e to the xsde-users
mailing list instead of xsd-users.

Ted Quan <tedquan at gmail.com> writes:

> I try the following command parser/serializer.  I got the following error:
> 
> xsde cxx-serializer
> --generate-inline --generate-empty-impl --generate-test-driver
> --force-overwrite ElectronicReceiptSubmit.xsd
> 
> ElectronicReceiptSubmit.xsd: error: unable to generate the test driver
> without a unique document root
> ElectronicReceiptSubmit.xsd: info: use --root-element-* options to specify
> the document root
>
> [...]
>
> Could you shred some light?

Well, it is what the error message says. The --generate-test-driver
option generates a test driver that parses/serializes a document
with a specific root element. If the schema has only one global
element, then it is assumed to be the root element. If the schema
defines multiple global elements, then all of them are valid root
elements and the above error is issued. To resolve it, you can pick
a root element that you want the driver to use and specify it with
the --root-element options.

Boris



More information about the xsde-users mailing list