Bug 29092 - 2.1 site.xml in update site incompatible with 2.0
Summary: 2.1 site.xml in update site incompatible with 2.0
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P1 critical (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Dejan Glozic CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-07 12:19 EST by Ed Burnette CLA
Modified: 2003-01-20 09:45 EST (History)
0 users

See Also:


Attachments

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