I'm getting the following error hwen unmarshalling :
.DefaultValidationEventHandler: [ERROR]: "cl_class4" is used as an ID value
more than once.
javax.xml.bind.UnmarshalException
- with linked exception:
[com.sun.msv.verifier.ValidityViolation: "cl_class4" is used as an ID value
more than once.]
I can succesfully validate the document against the schema using another
tool, but JAXB complains when unmarshalling.
Any hint ?
Is this a JAXB bug? Am I doing something wrong ?
SCHEMA:
<xsd:schema xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
targetNamespace="
http://www.acme.com/xml/schemas"
xmlns="
http://www.acme.com/xml/schemas"
elementFormDefault="unqualified"
attributeFormDefault="unqualified">
<xsd:element name="package" type="PackageDevelopmentType"/>
<xsd:complexType name="PackageDevelopmentType">
<!-- Sequenced entities -->
<xsd:all>
<xsd:element name="condition" type="DependenciesType" minOccurs="0"/>
....some other definitions removed ...
</xsd:all>
<!-- Attributes list -->
<xsd:attribute name="id" type="xsd:ID" use="required"/>
</xsd:complexType>
<xsd:element name="property">
<xsd:complexType>
<xsd:attribute name="name" type="xsd:ID"/>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="DependenciesType">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="d-or">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="property" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="temp" type="xsd:boolean" use="optional"
default="false"/>
<xsd:attribute name="execpostinstall" type="xsd:boolean"
use="optional" default="false"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="d-not">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="property"/>
</xsd:sequence>
<xsd:attribute name="temp" type="xsd:boolean" use="optional"
default="false"/>
<xsd:attribute name="execPostInstall" type="xsd:boolean"
use="optional" default="false"/>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
DOCUMENT:
<acme:package xmlns:acme="
http://www.acme.com/xml/schemas"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
id="mypack01.eng">
<condition>
<d-or execpostinstall="true">
<acme:property name="cl_class1"/>
</d-or>
<d-or>
<acme:property name="cl_class2"/>
</d-or>
<d-or>
<acme:property name="cl_class3"/>
<acme:property name="cl_class4"/>
</d-or>
<d-not>
<acme:property name="cl_class5"/>
</d-not>
</condition>
</package>