Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345973 - Schema Generation differs from RI for namespace=""
Summary: Schema Generation differs from RI for namespace=""
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-16 11:39 EDT by Denise Smith CLA
Modified: 2022-06-09 10:30 EDT (History)
2 users (show)

See Also:


Attachments
Proposed changes and tests (25.80 KB, patch)
2011-09-14 14:50 EDT, Denise Smith CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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