[xsd-users] Polymorphism w/ substitution groups,
but without xsi:type
Boris Kolpackov
boris at codesynthesis.com
Tue Feb 12 08:51:29 EST 2008
Hi Lane,
Lane Wimberley <techlane64 at gmail.com> writes:
> Everything builds just fine, but when I attempt to parse an instance file,
> the parser doesn't recognize the derived type (analogous to CD on pg 50) --
> it says the instance of the derived type is an "unknown element."
You need to compile your schemas with the --generate-polymorphic option.
See Section 2.11, "Mapping for xsi:type and Substitution Groups" in the
C++/Tree Mapping User Manual for more information:
http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.11
The 'polymorphism' example in the examples/cxx/tree/ directory can also
be useful.
> I just updated my xsd version to the latest -- 3.1.0-1 (Debian), and I'm
> using C++/Tree. (I saw something about polymorphism not being supported
> completely in C++/Parser ... yet ... )
Actually, from XSD 3.1.0 polymorphism is completely support in both
C++/Tree and C++/Parser mappings.
Boris
More information about the xsd-users
mailing list