users@jaxb.java.net

unmarshal/marshal discrepancy with attribute

From: Marc Dumontier <dumontier_at_mshri.on.ca>
Date: Thu, 02 Jan 2003 17:00:42 -0500

Hi,

I've created a schema, and have run it through the jaxb compiler
successfully. I can unmarshall an xml file which conforms to the schema,
but if i marshal it back to a file, that file is no longer compliant.
I've found the section where the problem is occuring and have attached
all relevant data. any help is very much appreciated.

 From the schema
-------------------------

<xs:complexType name="BIND-experimental-system1">
<xs:simpleContent>
<xs:extension base="xs:integer">
<xs:attribute name="value">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="not-specified" />
<xs:enumeration value="alanine-scanning" />
<xs:enumeration value="affinity-chromatography" />
<xs:enumeration value="atomic-force-microscopy" />
<xs:enumeration value="autoradiography" />
<xs:enumeration value="competition-binding" />
<xs:enumeration value="cross-linking" />
<xs:enumeration value="deuterium-hydrogen-exchange" />
<xs:enumeration value="electron-microscopy" />
<xs:enumeration value="electron-spin-resonance" />
<xs:enumeration value="elisa" />
<xs:enumeration value="equilibrium-dialysis" />
<xs:enumeration value="fluorescence-anisotropy" />
<xs:enumeration value="footprinting" />
<xs:enumeration value="gel-retardation-assays" />
<xs:enumeration value="gel-filtration-chromatography" />
<xs:enumeration value="hybridization" />
<xs:enumeration value="immunoblotting" />
<xs:enumeration value="immunoprecipitation" />
<xs:enumeration value="immunostaining" />
<xs:enumeration value="interaction-adhesion-assay" />
<xs:enumeration value="light-scattering" />
<xs:enumeration value="mass-spectrometry" />
<xs:enumeration value="membrane-filtration" />
<xs:enumeration value="monoclonal-antibody-blockade" />
<xs:enumeration value="nuclear-translocation-assay" />
<xs:enumeration value="phage-display" />
<xs:enumeration value="reconstitution" />
<xs:enumeration value="resonance-energy-transfer" />
<xs:enumeration value="site-directed-mutagenesis" />
<xs:enumeration value="sucrose-gradient-sedimentation" />
<xs:enumeration value="surface-plasmon-resonance-chip" />
<xs:enumeration value="transient-coexpression" />
<xs:enumeration value="three-dimensional-structure" />
<xs:enumeration value="two-hybrid-test" />
<xs:enumeration value="allele-specific-complementation" />
<xs:enumeration value="far-western" />
<xs:enumeration value="colocalization" />
<xs:enumeration value="other" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>


the element being unmarshalled
------------------------------------------
<BIND-experimental-system
value="immunoprecipitation">18</BIND-experimental-system>


the element being marshalled
---------------------------------------
<BIND-experimental-system>18</BIND-experimental-system>


thanks in advance

Marc Dumontier
Intermediate Software Developer
Mount Sinai Hospital
Toronto, ON
dumontier_at_mshri.on.ca