Bug 29092

Summary: 2.1 site.xml in update site incompatible with 2.0
Product: [Eclipse Project] Platform Reporter: Ed Burnette <ed.burnette>
Component: Update (deprecated - use Eclipse>Equinox>p2)Assignee: Dejan Glozic <dejan>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P1    
Version: 2.1   
Target Milestone: 2.1 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Ed Burnette CLA 2003-01-07 12:19:43 EST
When I use the PDE in 2.1M4 to create an update site it creates a site.xml 
file that starts like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE site SYSTEM "dtd/site.dtd">
<site>

When I try to reference this in 2.0.2 I get an error from the update manager:

Unable to access "http://myserver/Updates"
Error parsing site stream. [org.xml.sax.SAXException: The XML stream is not a 
valid default site.xml file. The root tag is not site.]
Error accessing site stream. [java.io.FileNotFoundException: C:\Program 
Files\Eclipse2.0.2\dtd\site.dtd (The system cannot find the path specified)]

I thought the update sites were supposed to be compatible between releases, 
are they not?
Comment 1 Dejan Glozic CLA 2003-01-07 12:33:54 EST
This is a valid concern. We updated our parsers to ignore the DTD information 
(it is only used during development to validate files) but you are right that 
this breaks backward compatibility. We will stop adding the DTDs. In the mean 
time, just remove the DOCTYPE line manually before connecting to the site.
Comment 2 Ed Burnette CLA 2003-01-07 15:28:00 EST
I tried taking it out of my site.xml but then ran into the same problem in all 
feature.xml's. Interestingly, the plugin.xml doesn't seem to have the DOCTYPE.
Comment 3 Dejan Glozic CLA 2003-01-07 15:45:53 EST
Both feature.xml and site.xml are affected - these are XML files with a fixed 
(closed) DTD that can be validated 'for free' using the validating XML parser. 
In contrast, plugin.xml is open-ended - it has a fixed portion (libraries, 
imports, extension points) and a variable portion (extensions) and cannot be 
validated automatically. To validate plugin.xml while using PDE, you need to 
turn the various options in 'Compilers' PDE preference page from 'Ignore' 
to 'Warning' or 'Error'.
Comment 4 Dejan Glozic CLA 2003-01-20 09:45:26 EST
Fixed. We will not add DOCTYPE line when generating feature.xml and site.xml