Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 345973

Summary: Schema Generation differs from RI for namespace=""
Product: z_Archived Reporter: Denise Smith <denise.mahar>
Component: EclipselinkAssignee: 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:
Description Flags
Proposed changes and tests none

Description Denise Smith CLA 2011-05-16 11:39:42 EDT
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>
Comment 1 Denise Smith CLA 2011-09-14 14:50:49 EDT
Created attachment 203359 [details]
Proposed changes and tests
Comment 2 Denise Smith CLA 2011-09-14 15:51:39 EDT
Modified SchemaGenerator to create an attribute with form="qualified" as in the example below.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:16:10 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:30:59 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink