jaxb2-basics icon indicating copy to clipboard operation
jaxb2-basics copied to clipboard

Copyable: Missing copyTo for Map-Field (from: anyAttribute)

Open mmichaelis opened this issue 7 years ago • 3 comments

Generating classes from XLIFF 1.2 (see https://docs.oasis-open.org/xliff/v1.2/cs02/xliff-core-1.2-strict.xsd) using the copyable plugin results in all classes missing a way to clone "otherAttributes" which are introduced by this XSD entry (see for example trans-unit element):

<xsd:anyAttribute namespace="##other" processContents="strict"/>

As workaround I manually added a corresponding section within the copyTo block (we only generate classes on demand). But of course in the long run this approach isn't feasible.

Did I miss any configuration option? As it seems not only the copyable plugin ignores this field (but there it is most harmful) but also the equals, hashCode and toString plugin.

mmichaelis avatar Sep 14 '18 10:09 mmichaelis

Please create a PR with a reproducing project here: https://github.com/highsource/jaxb2-basics-support under a/anyAttribute.

highsource avatar Sep 14 '18 11:09 highsource

Here is the PR: highsource/jaxb2-basics-support#1. It also shows the missing handling in toString, equals and hashCode plugin.

mmichaelis avatar Sep 14 '18 17:09 mmichaelis

Thank you, reproduced.

highsource avatar Sep 14 '18 17:09 highsource