Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

XJC: anyAttribute ignored when combined with inheritance #1146

Description

@rcosne

Hi,

When using XJC 2.3.0 on the following schema, the anyAttribute is not processed, so the otherAttributes field in not generated in my bean:

<xsd:complexType name="jsonObject">
        <xsd:complexContent>
            <xsd:extension base="tns:jsonNode">
                <xsd:sequence>
                    <xsd:element ref="tns:jsonNode" minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
                <xsd:attribute name="name" type="xsd:string" use="optional"/>
                <xsd:anyAttribute namespace="##any" processContents="lax"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

When removing the inheritance, the otherAttributes field is properly generated:
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();

Workaround: use the last version supporting this combination, 2.1.10.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions