[xsde-users] No polymorphism without substitutionGroup?
Boris Kolpackov
boris at codesynthesis.com
Wed Jun 12 09:27:05 EDT 2013
Hi Werner,
Werner Haug <werner.haug at agfa.com> writes:
> It seems xsde generates no polymorphic code when there is no
> substitutionGroup.
Without substitution groups XSD/e doesn't know which types are
polymorphic and which are not. And generating polymorphism support
for all types would be wasteful.
> --polymorphic-type root
Two problems with this: Firstly, there is no type named 'root' in
your schema. That's an element name and the type name is 'root_type'.
But even if you fix this you still won't get the desired behavior
because it is not this type that you need to mark as polymorphic.
Rather, it is 'base'. So what you need is:
--polymorphic-type base
XSD/e will also automatically treat all types derived from 'base' as
polymorphic.
Boris
More information about the xsde-users
mailing list