users@jaxb.java.net

JAXB generated java beans not generated in proper heirarchy based on xsd:extension

From: <harsh.marwaha1_at_gmail.com>
Date: Fri, 24 Feb 2012 02:15:23 +0000 (GMT)

Here is the snippet of my schema:

<xs:complexType name="EN" mixed="true">
                <xs:annotation>
                        <xs:documentation>
            A name for a person, organization, place or thing. A
            sequence of name parts, such as given name or family
            name, prefix, suffix, etc. Examples for entity name
            values are "Jim Bob Walton, Jr.", "Health Level Seven,
            Inc.", "Lake Tahoe", etc. An entity name may be as simple
            as a character string or may consist of several entity name
            parts, such as, "Jim", "Bob", "Walton", and "Jr.", "Health
            Level Seven" and "Inc.", "Lake" and "Tahoe".
         </xs:documentation>
                </xs:annotation>
                <xs:complexContent mixed="true">
                        <xs:extension base="ANY">
                                <xs:sequence>
                                        <xs:choice minOccurs="0"
maxOccurs="unbounded">
                                                <xs:element
name="delimiter" type="en.delimiter"/>
                                                <xs:element
name="family" type="en.family"/>
                                                <xs:element
name="given" type="en.given"/>
                                                <xs:element
name="prefix" type="en.prefix"/>
                                                <xs:element
name="suffix" type="en.suffix"/>
                                        </xs:choice>
                                        <xs:element name="validTime"
type="IVL_TS" minOccurs="0">
                                                <xs:annotation>
                                                       
<xs:documentation>
                        An interval of time specifying the time during
which
                        the name is or was used for the entity. This
                        accomodates the fact that people change names
for
                        people, places and things.
                     </xs:documentation>
                                                </xs:annotation>
                                        </xs:element>
                                </xs:sequence>
                                <xs:attribute name="use"
type="set_EntityNameUse" use="optional">
                                        <xs:annotation>
                                                <xs:documentation>
                     A set of codes advising a system or user which
name
                     in a set of like names to select for a given
purpose.
                     A name without specific use code might be a
default
                     name useful for any purpose, but a name with a
specific
                     use code would be preferred for that respective
purpose.
                  </xs:documentation>
                                        </xs:annotation>
                                </xs:attribute>
                        </xs:extension>
                </xs:complexContent>
        </xs:complexType>

and here is the generated JAXB bean:

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "EN", propOrder = {
    "content"
})
@XmlSeeAlso({
    ON.class,
    PN.class,
    TN.class
})
public class EN {

    @XmlElementRefs({
        @XmlElementRef(name = "prefix", namespace = "urn:hl7-org:v3",
type = JAXBElement.class),
        @XmlElementRef(name = "validTime", namespace =
"urn:hl7-org:v3", type = JAXBElement.class),
        @XmlElementRef(name = "delimiter", namespace =
"urn:hl7-org:v3", type = JAXBElement.class),
        @XmlElementRef(name = "given", namespace = "urn:hl7-org:v3",
type = JAXBElement.class),
        @XmlElementRef(name = "suffix", namespace = "urn:hl7-org:v3",
type = JAXBElement.class),
        @XmlElementRef(name = "family", namespace = "urn:hl7-org:v3",
type = JAXBElement.class)
    })
    @XmlMixed
    protected List<Serializable> content;
    @XmlAttribute

Based on the schema EN class should extend from ANY class, but it does
not.

Any clues?

Thanks