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

Bug 79122

Summary: xsd generated by PDE does not comform to W3 specs
Product: [Eclipse Project] PDE Reporter: Mazen Faraj <mfaraj>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Mazen Faraj CLA 2004-11-19 18:29:22 EST
reading some of the schema docs and comparing w3 specs with the schema 
generated by PDE for an extension point, I found these two bugs. 
1) inavlid use of appInfo: 
you use appInfo under annotation, and it should be appinfo lower case. 
If you leave it as is, I dont believe that the schema will validate. 
check: 
http://www.w3.org/TR/2004/REC-xmlschema-1-
20041028/structures.html#Annotation_details 

2)you dont prefix schema elements with a namespace (like xsd:element ...), 
which means that your schema will have validation errors because you are 
mixing the W3 schema namespace with the org.eclipse.ui.intro namespace for 
example. 
For the schema to validate, I belive you have to eithe explicity qualify the 
intro references and make the Schema namespace the default, or vise versa. 

eg: 

 <schema xmlns:intro="org.eclipse.ui.intro"
	targetNamespace="org.eclipse.ui.intro"
 	elementFormDefault="unqualified"    
	xmlns="http://www.w3.org/2001/XMLSchema"> 
   <element name="introContent">
      <complexType>
         <sequence>
            <element ref="intro:page" minOccurs="1" maxOccurs="unbounded"/>
            <element ref="intro:group" minOccurs="0" maxOccurs="unbounded"/>
            <element ref="intro:extensionContent" minOccurs="0" 
maxOccurs="unbounded"/>
         </sequence>
      </complexType>
   </element>

note in the above example, Schema is the default namespace, and intro has to 
ve explicitly qualified. 


I may be wrong about bug 2, but Im pretty sure about bug 1.   :-)
Comment 1 Mazen Faraj CLA 2004-11-19 18:30:22 EST
changing to PDE UI as I believe this is UI stuff.
Comment 2 Wassim Melhem CLA 2004-11-19 22:29:16 EST
you are certainly correct on both counts.

The reason why we got away with it for so long is because we parse the files 
ourselves.  However, this namespace issue is now becoming a big problem that 
must be addressed ASAP as people are including schemas in other schemas and 
using elements of conflicting names.
Comment 3 Wassim Melhem CLA 2005-06-07 12:11:29 EDT

*** This bug has been marked as a duplicate of 77043 ***