| Summary: | JAXB Externalized Metadata: Schema gen incorrect for XmlAnyAttribute containing xml-path without namespace | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | David McCann <david.mccann> | ||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 308677 | ||||||
| Attachments: |
|
||||||
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 The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
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> ...