[xsd-users] Abstract objects problem
Boris Kolpackov
boris at codesynthesis.com
Thu Mar 15 15:43:36 EDT 2007
Hi Romain,
Romain Garrigues <romain.garrigues at c-s.cnes.fr> writes:
> I have defined an abstract concept (AbstractTransformationModelType),
> and two classes which are subclasses of this concept
> (AffineTransformationModelType and ProjectiveTransformationModelType).
> Then, CoordinatesTransformationModelType has an element which is that
> abstract concept.
>
> Then, i have defined parsers for each complexType. I don't understand
> how to define CoordinatesTransformationModel_parser in driver.cxx so
> i can parse different xml files.
This is normally handled with XML Schema polymorphism features
(either substitution groups or xsi:type). The bad news is that
polymorphism is not yet supported by the C++/Parser mapping. We
hope to implement this in the next release.
If there is any way for you to know what type of XML you are
getting, then you can create two parsers, one for
AffineTransformationModelType and the other for
ProjectiveTransformationModelType. And then use one of them
depending on the type of document.
hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20070315/b8cad78f/attachment.pgp
More information about the xsd-users
mailing list