[Ext] Re: [xsd-users] DLLs and --generate-element-type --generate-element-map

Boris Kolpackov boris at codesynthesis.com
Tue Jul 14 08:28:00 EDT 2026


Hi Nicolas,

Nicolas Weidmann <n.weidmann at lombardodier.com> writes:

> And the second document that fails (parses only the Fidget part, not the
> SubFidget...)

Yes, because, as mentioned in my followup email, the element type feature
does not handle polymorphism (xsi:type in your case).

The further point I was trying to make in that email is that element
types/map are rarely useful with polymorphic root elements and your
test case matches this assessment since you only have one element.

I think the only sensible way forward is to stop using element types.
In the example that you have shown you just as easily can use the
Fidget type since there is a 1:1 mapping between Fidget and AcmeProduct.
It should still be easy enough to handle if you have a handful of
elements like AcmeProduct (note: elements that are part of substitution
groups don't count, only "true" roots of hierarchies). Admittedly it
will become problematic if you have a large number of "true" roots
like AcmeProduct.



More information about the xsd-users mailing list