Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 79122 - xsd generated by PDE does not comform to W3 specs
Summary: xsd generated by PDE does not comform to W3 specs
Status: RESOLVED DUPLICATE of bug 77043
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-19 18:29 EST by Mazen Faraj CLA
Modified: 2005-06-07 12:11 EDT (History)
0 users

See Also:


Attachments

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