Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363373 - schema generated with an invalid substitutionGroup
Summary: schema generated with an invalid substitutionGroup
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-09 14:35 EST by Karen Butzke CLA
Modified: 2022-06-09 10:35 EDT (History)
2 users (show)

See Also:


Attachments
example schema (633 bytes, application/octet-stream)
2011-11-09 14:35 EST, Karen Butzke CLA
no flags Details
propsed fix and tests (19.41 KB, patch)
2012-03-28 13:47 EDT, Matt MacIvor CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2011-11-09 14:35:12 EST
Created attachment 206731 [details]
example schema

I generated classes from the attached schema and then generated a schema from those classes and ended up with an invalid schema.

the generated schema contains:
   <xsd:element name="bar" substitutionGroup="foo">
      <xsd:complexType>
         <xsd:attribute name="baz" type="xsd:boolean"/>
      </xsd:complexType>
   </xsd:element>

instead of:
   <xsd:element name="bar" substitutionGroup="foo">
      <xsd:complexType>
         <xsd:complexContent>
            <xsd:extension base="foo">
               <xsd:attribute name="baz" type="xsd:boolean"/>
            </xsd:extension>
         </xsd:complexContent>
      </xsd:complexType>
   </xsd:element>
Comment 1 Matt MacIvor CLA 2012-03-28 13:47:25 EDT
Created attachment 213305 [details]
propsed fix and tests
Comment 2 Matt MacIvor CLA 2012-03-28 14:37:51 EDT
Attached patch checked into trunk and 2.3
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:16:09 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:35:50 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink