 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Sony Antony Guest
|
Posted: Tue Aug 26, 2003 3:37 pm Post subject: Polymorphism in xml ?? |
|
|
We have an xml/java/W3C schema/jaxb based application.
I would like to define some elements that are extensible. In
particular the schema has an element defined as 'exception'. This has
an integer field 'errorcode' and 'reason'. But I would like to allow
the XML to send additional fields, if the particular exception
demands it ( 'status' for ex. )
Is there any way to do this without violating the schema.
If there is what will happen when I unmarshal using jaxb. ( since the
generated classes does not know about these extra fields )
I read about substitutionGroup s in xml. But it does not allow you to
add an additional field. Also it requires the substituting/derived
element to have the same type as the original.
All the examples I saw for substitutiongroup were with a single field
of type xs:string. Is it possible to use this for an element
containing multiple elements. Is there an example for this out there.
Thanks in advance.
--sony
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|