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

XJC: anyAttribute ignored when combined with inheritance #1146

Open
rcosne opened this issue Oct 4, 2017 · 1 comment
Open

XJC: anyAttribute ignored when combined with inheritance #1146

rcosne opened this issue Oct 4, 2017 · 1 comment

Comments

@rcosne
Copy link

rcosne commented Oct 4, 2017

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.

@rcosne
Copy link
Author

rcosne commented Feb 9, 2018

Pull request submitted: #1165

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant