I think it depends on how the complexTypes and elements inheriting from that type are used. If the objects corresponding to the elements are in a common class hierarchy you should be able to use an abstract <mapping> for the complexType, and extend it with a <mapping> for each subclass. That only works for one level of inheritance at present.

You can also use the label/using approach mentioned in an earlier email.

These don't handle everything, and the label/using approach is somewhat ugly, but it seems like they handle most real cases. Am I missing something, Cameron?

 - Dennis

Cameron Taggart wrote:

AFAIK, right now you have to duplicate over and over.  :(

Cameron


On Wed, 22 Sep 2004 16:57:37 -0700 (PDT), Bao <[EMAIL PROTECTED]> wrote:


In JiBX, How do you work with complexTypes and
elements that inherit from it (defined in an XML
schema)? I am not sure how to map it so that I only
have to define the complex type once instead of over
and over again for each structure that inherits from
it.




-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to