EXTERNAL: Re: [xsd-users] Serialization of Polymorphic Sequences

Friess, Jason jason.friess at lmco.com
Wed Sep 21 16:53:19 EDT 2011


Thanks!  Using "--polymorphic-type ParentType" when generating the C++ code seems to work for us.  It seems like CodeSynthesis was not automatically recognizing ParentType as the root of a polymorphic type hierarchy (probably because we're not using "substitutionGroup" declarations in our XSD's.  We are now seeing the result we're expecting when serializing to XML.

Thanks,
Jason

-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Sent: Wednesday, September 21, 2011 2:47 AM
To: Friess, Jason
Cc: xsd-users at codesynthesis.com; Pravia, Marco (US SSA); Olbert, Adolf (US SSA); Dibona, Phillip J; basil.krikeles at baesystems.com; Czajkowski, Michael; Jameson, Stephen M
Subject: EXTERNAL: Re: [xsd-users] Serialization of Polymorphic Sequences

Hi Jason,

Friess, Jason <jason.friess at lmco.com> writes:

> // display XML of modified MessageType object - this does not work! - the
> // XML printed here does not reflect the ChildType instance - only that a
> // ParentType has been included
>
> Message (cout, *mfs, map);

Your code looks fine to me. Have you compiled your schemas with the
--generate-polymorphic option and used the --polymorphic-type option
to mark ParentType as the root of a polymorphic type hierarchy?

See the XSD compiler command line manual (man pages) for more
information on these options:

http://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml

Boris



More information about the xsd-users mailing list