Community
Participate
Working Groups
A mechanism should be provided to allow the customization of the name mangling algorithm used by JAXB. This could be implemented as an annotation like the following (with an equivalent XML representation) that could be specified at the package/type/field/property level. This annotation would take an impl class that provides the name mangling algorithm. @XmlNameMangler(UpperCaseNameMangler.class) The impl class would need to implement an interface like the following: public interface NameMangler { mangeName(String namespaceURI, String name); } MOXy could provide several implementations of this interface: 1. default - the standard algorithm 2. upper case - everything is upper case 3. lower case - everything is lower case
Some consideration should be given as to whether this can be made consistent with the schema annotation "nameXmlTransform" as described in section 7.6.1 of the JAXB 2.1 specification.
Correction: The NameMangler interface should look something like: /** * Return the XML local name based on the Java attribute name */ public interface NameMangler { String mangleName(String name); }
Created attachment 192976 [details] Proposed code changes
Created attachment 192977 [details] Proposed test changes
Created attachment 193088 [details] Proposed code changes -updated
Created attachment 193089 [details] Proposed test changes -updated
Created attachment 193726 [details] Proposed changes
Created attachment 193727 [details] Proposed test changes
Fixed with patches attached.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink