users@jaxb.java.net

Unmarshalling in JAXB

From: Olga Caprotti <ocaprott_at_risc.uni-linz.ac.at>
Date: Wed, 03 Dec 2003 10:17:01 +0100

Hi,


I have come across a problem in unmarshalling a document composed of
elements coming from various namespaces all known to the JAXBContext.
It looks like the unmarshaller forgets to process some inner elements
which are allowed by the <xsd:any> schema type.

The problem is easily explained by fetching my files:
http://www.risc.uni-linz.ac.at/people/ocaprott/openmath/monet-based-xsd.tgz

You will need to set JWSDP_HOME environment variable to use ant. I have 1.3.

Running "ant jar" builds all the classes.
The example shows the problem: "ant run".

Compare the output obtained from first unmarshaller and then
marshalling the document src/xml/risch.xml.
The marshalled child element <monet:implementation name="RImpl"
has no fragment in the namespace mathb:

Unmarshalled-Marshalled
=======================


<monet:implementation name="RImpl"
xmlns:monet="http://monet.nag.co.uk/monet/OpenMathDC">
     <monet:software href="http://www.wolfram.com"/>
     <monet:software href="http://riaca.win.tue.nl/software#ROML"/>
     <monet:hardware
href="http://risc.uni-linz.ac.at/mathbroker/RischIndefIntegration#perseus.risc.uni-linz.ac.at"/>


    <monet:algorithm
href="http://risc.uni-linz.ac.at/mathbroker/RischIndefIntegration#RischAlg"/>
</monet:implementation>



Original
=========

    <monet:implementation name="RImpl">
     <mathb:efficiencyfactor wrt="S200Spec">
        <mathb:speed>1.1</mathb:speed>
        <mathb:throughput>0.7</mathb:throughput>
     </mathb:efficiencyfactor>
       <monet:software href="http://www.wolfram.com" />
       <monet:software href="http://riaca.win.tue.nl/software#ROML"/>
       <monet:hardware
href="http://risc.uni-linz.ac.at/mathbroker/RischIndefIntegration#perseus.risc.uni-linz.ac.at"/>
       <monet:algorithm
href="http://risc.uni-linz.ac.at/mathbroker/RischIndefIntegration#RischAlg"/>
     </monet:implementation>


This is quite strange since the unmarshaller does pick up a
<mathb:machine_hardware...> fragment at a higher level (getAny returns it).


Any help is very appreciated.
Best regards,
Olga Caprotti










---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net