Community
Participate
Working Groups
Considering the following schema: ... <xs:element name="name" type="xs:string"/> <xs:element name="nom" substitutionGroup="myns:name"/> <xs:complexType name="person"> <xs:sequence> <xs:element ref="myns:name"/> </xs:sequence> </xs:complexType> <xs:element name="person" type="myns:person"/> <xs:element name="personne" substitutionGroup="myns:person"/> ... Taking this schema and generating EclipseLink mappings, if we set the JAXBElement for "name" to have a QName of "nom", then you will see duplicate elements written to XML, for both the original as well as the substituted name: <?xml version="1.0" encoding="UTF-8"?> <ns0:person xmlns:ns0="myNamespace"> <ns0:name>Bob Smith</ns0:name> <ns0:nom>Bob Smith</ns0:nom> </ns0:person>
Created attachment 167577 [details] Patch Code fix + new test case
Fixed and checked in, reviewed by bdoughan.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink