### Eclipse Workspace Patch 1.0 #P org.eclipse.core.contenttype Index: src/org/eclipse/core/internal/content/XMLRootHandler.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/XMLRootHandler.java,v retrieving revision 1.4 diff -u -r1.4 XMLRootHandler.java --- src/org/eclipse/core/internal/content/XMLRootHandler.java 1 Feb 2008 15:23:28 -0000 1.4 +++ src/org/eclipse/core/internal/content/XMLRootHandler.java 6 Feb 2009 17:09:33 -0000 @@ -72,6 +72,8 @@ * successful to the point of finding the top-level element. */ private String namespaceFound = null; + + private String versionFound = null; public XMLRootHandler(boolean checkRoot) { this.checkRoot = checkRoot; @@ -162,6 +164,11 @@ return namespaceFound; } + public String getVersion() { + return this.versionFound; + } + + public boolean parseContents(InputSource contents) throws IOException, ParserConfigurationException, SAXException { // Parse the file into we have what we need (or an error occurs). try { @@ -219,6 +226,7 @@ public final void startElement(final String uri, final String elementName, final String qualifiedName, final Attributes attributes) throws SAXException { elementFound = elementName; namespaceFound = uri; + versionFound = attributes.getValue("version"); throw new StopParsingException(); } Index: src/org/eclipse/core/runtime/content/XMLRootElementContentDescriber2.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.core.contenttype/src/org/eclipse/core/runtime/content/XMLRootElementContentDescriber2.java,v retrieving revision 1.1 diff -u -r1.1 XMLRootElementContentDescriber2.java --- src/org/eclipse/core/runtime/content/XMLRootElementContentDescriber2.java 1 Feb 2008 15:23:28 -0000 1.1 +++ src/org/eclipse/core/runtime/content/XMLRootElementContentDescriber2.java 6 Feb 2009 17:09:33 -0000 @@ -32,7 +32,7 @@ *
*
* The value of "element" is specified using such a format
- * {namespace}name/dtd
. The namespace or dtd part
+ * {namespace}name/dtd:version
. The namespace or dtd part
* can be omitted and accepted are values like name/dtd
,
* {ns}name
and name
.
*