S
Sony Antony
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
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