Hello,
I am new to JAXB but decided to give it a try.
I have a nested schema like this:
...
<xs:element name="topic">
<xs:complexType>
<xs:sequence>
<xs:element name="topic" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="topic" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="topic" minOccurs="0" maxOccurs="unbounded">
...
And when xjc compiled I get Java code which don't compile.
Example in Topic.java
public class Topic {
...
public static class Topic {
...
}
}
with the error "+The nested type Topic cannot hide an enclosing type+"
The problem is obviously that xjc creates nested classes with the same name as the parent class.
The XML Schema works fine in reqular XML editors.
Is it so that xjc only works with tailored schemas and I must read up on its limitation or is xjc intended to work with all valid schemas?
In either case do someone have any tips or thoughts on this.
/Thanks Farmor