[xsd-users] Sequence + Choice (or Alternative)
Boris Kolpackov
boris at codesynthesis.com
Thu Apr 15 10:19:23 EDT 2010
Hi Marvin,
Marvin M. <xsd-users at groenndemon.de> writes:
> I tried that, but then I had several global elements (the abstract
> element and its substitution derivations) which were all legal to use as
> the document root (xsd.exe complained that it didn't know which one was
> the root).
XSD warned you that it is generating parsing functions for all global
elements. That's the default behavior. You can specify which global
elements are actual document roots with the --root-element option:
--root-element grammar
> Also, the schema was much more complex, larger in size and harder
> to read.
Yes, the schema is a bit more complex, though, IMO, this approach is
conceptually cleaner.
> Unless you have a solution for those problems, I think I'll stick with
> the old choice and use the XSD/e approach instead, even though the
> syntax is less neat.
Yes, that's not a bad idea either.
Boris
More information about the xsd-users
mailing list