users@jaxb.java.net

mixed content - compiler bug?

From: Magnus Bergman <magnus.bergman_at_voiceprovider.com>
Date: Fri, 13 Dec 2002 12:38:10 +0100

Hi, still got some problems with mixed content and "recursive
structures", this time I think
it is a xjc-compiler-bug!?

this is my xsd:
...
<xsd:complexType name="Cd" mixed="true">
  <xsd:sequence>
    <xsd:element name="artist" type="xsd:string"/>
    <xsd:element name="title" type="xsd:string"/>
    <xsd:element name="cd" type="Cd"/>
  </xsd:sequence>
  <xsd:attribute name="model" type="xsd:string"/>
</xsd:complexType>
...

the corresponding xml could look like this:
...
  <cd model="double">This is my favourite
    <artist>Red hot chili peppers</artist>
    <title>By the way</title>
    <cd model="bonus cd">
      <artist>Red hot chili peppers</artist>
      <title>californication</title>
    </cd>
  </cd>
...

 From this the xjc will generate an interface Cd with an inner interface
also called Cd which
ofcourse will result in javac-compiler-error!

Does anybody know how to fix this with a workaround or have I made a
misstake somewhere?
I can't change the xml-structure, it's not in my hands...

Any help would be great.
/magnus