| Summary: | Schema Generation differs from RI for namespace="" | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Denise Smith <denise.mahar> | ||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | blaise.doughan, eclipselink.oxm-inbox | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 203359 [details]
Proposed changes and tests
Modified SchemaGenerator to create an attribute with form="qualified" as in the example below. 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 |
Given this class @XmlType(namespace="personal-info") public class Test { @XmlAttribute(namespace="") public String foo; } ------------------- The RI generates the following XSD <xs:schema attributeFormDefault="qualified" version="1.0" targetNamespace="personal-info" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="test"> <xs:sequence/> <xs:attribute name="foo" type="xs:string" form="unqualified"/> </xs:complexType> </xs:schema> -------------------- EclipseLink generates the following <xsd:schema xmlns:ns0="personal-info" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="personal-info" attributeFormDefault="qualified"> <xsd:import schemaLocation="schema1.xsd"/> <xsd:complexType name="test"> <xsd:sequence/> <xsd:attribute ref="foo"/> </xsd:complexType> </xsd:schema> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:attribute name="foo" type="xsd:string"/> </xsd:schema>