I am getting some errors:
Buildfile: build.xml
compile:
[echo] Compiling the schema...
[xjc] Compiling file:/E:/java/jwsdp-1.1/jaxb-1.0/tests/dynarray.xsd
[xjc] [ERROR] A property with the same name "Content" is generated from more than one schema component.
[xjc] line 55 of dynarray.xsd
[xjc] [ERROR] (Relevant to above error) another one is generated from this schema component.
[xjc] line 39 of dynarray.xsd
[xjc] [ERROR] A property with the same name "Content" is generated from more than one schema component.
[xjc] line 55 of dynarray.xsd
[xjc] [ERROR] (Relevant to above error) another one is generated from this schema component.
[xjc] line 28 of dynarray.xsd
[xjc] [ERROR] A property with the same name "Content" is generated from more than one schema component.
[xjc] line 55 of dynarray.xsd
[xjc] [ERROR] (Relevant to above error) another one is generated from this schema component.
[xjc] line 17 of dynarray.xsd
BUILD FAILED
file:E:/java/jwsdp-1.1/jaxb-1.0/tests/build.xml:27: unable to parse the schema. Error messages should have been provided
My schema is:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
targetNamespace="
http://www.temporal-wave.com/spec/dynarray"
xmlns="
http://www.temporal-wave.com/spec/dynarray"
elementFormDefault="qualified">
<xsd:element name="dynArray" type="dynArrayIntf" />
<xsd:complexType name="dynArrayIntf" mixed="true">
<xsd:complexContent>
<xsd:extension base="content">
<xsd:choice>
<xsd:element name="attribute" type="attributeIntf" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="attributeIntf" mixed="true">
<xsd:complexContent>
<xsd:extension base="content">
<xsd:choice>
<xsd:element name="value" type="valueIntf" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
<xsd:attribute name="id" type="xsd:string"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="valueIntf" mixed="true">
<xsd:complexContent>
<xsd:extension base="content">
<xsd:choice>
<xsd:element name="subvalue" type="subvalueIntf" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
<xsd:attribute name="id" type="xsd:string"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="subvalueIntf" mixed="true">
<xsd:complexContent>
<xsd:extension base="content">
<xsd:attribute name="id" type="xsd:string"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="content" mixed="true">
<xsd:choice>
<xsd:element name="text" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="hex" type="xsd:hexBinary" minOccurs="0" maxOccurs="1"/>
<xsd:element name="base64" type="xsd:base64Binary" minOccurs="0" maxOccurs="1"/>
</xsd:choice>
</xsd:complexType>
</xsd:schema>
The schema shows as valid in Architag XRay XML Editor... I assumed JAXB would generate a single class for the "content" complexType, then use it for all of the tags.... what do I need to do to make it work right?
Thanks,
Malachi