Community
Participate
Working Groups
The schema gen for an XmlAnyAttribute with a non-namespace qualified xml-path is not working correctly. The 'any' is being applied to the second last path element, as opposed to the last one. For example, the following: <xml-any-attribute java-attribute="stuff" xml-path="read-only/stuff" /> Should result in: ... <xsd:element name="read-only"> <xsd:complexType> <xsd:sequence> <xsd:element name="stuff"> <xsd:complexType> <xsd:anyAttribute processContents="skip" namespace="##other"/> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> ... But currently we get: ... <xsd:element name="read-only"> <xsd:complexType> <xsd:anyAttribute processContents="skip" namespace="##other"/> </xsd:complexType> </xsd:element> ...
Created attachment 169157 [details] Contains proposed fix and test case mods Modified SchemaGenerator such that if we are dealing with an 'any' we process the last path fragment, which is the one the 'any' will be applied to. Added 2 XSD files with xml-path info for testing. Modified AnyAttributeTests to validate against the exisgin and new XSD files to verify the last path element is being processed correctly.
Reviewed by: matt.macivor@oracle.com Tests: unit tests pass as expected; AnyAttributeMappingTestCases
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink