diff --git a/_service b/_service new file mode 100644 index 0000000..273d538 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + git + https://github.com/dom4j/dom4j.git + version-2.0.3 + version-* + @PARENT_TAG@ + version-(.*) + + + *.tar + xz + + + diff --git a/dom4j-1.6.1-bug1618750.patch b/dom4j-1.6.1-bug1618750.patch deleted file mode 100644 index f954337..0000000 --- a/dom4j-1.6.1-bug1618750.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- dom4j/src/java/org/dom4j/util/SimpleSingleton.java -+++ dom4j/src/java/org/dom4j/util/SimpleSingleton.java -@@ -35,8 +35,7 @@ - if (singletonClassName != null) { - Class clazz = null; - try { -- clazz = Thread.currentThread().getContextClassLoader().loadClass( -- singletonClassName); -+ clazz = Class.forName(singletonClassName); - singletonInstance = clazz.newInstance(); - } catch (Exception ignore) { - try { diff --git a/dom4j-1.6.1-debian.tar.bz2 b/dom4j-1.6.1-debian.tar.bz2 deleted file mode 100644 index 935f0ae..0000000 --- a/dom4j-1.6.1-debian.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d72427a11a23df97f8957331269df7fde4fcc982ac3b9d399a49e4df8598b94a -size 1962425 diff --git a/dom4j-1.6.1.pom b/dom4j-1.6.1.pom deleted file mode 100644 index c3b107a..0000000 --- a/dom4j-1.6.1.pom +++ /dev/null @@ -1,221 +0,0 @@ - - 4.0.0 - dom4j - dom4j - dom4j - 1.6.1 - dom4j: the flexible XML framework for Java - http://dom4j.org - - http://sourceforge.net/tracker/?group_id=16035 - - - - -
dom4j-dev@lists.sourceforge.net
-
-
-
- 2001 - - - dom4j user list - http://lists.sourceforge.net/lists/listinfo/dom4j-user - http://lists.sourceforge.net/lists/listinfo/dom4j-user - http://www.mail-archive.com/dom4j-user%40lists.sourceforge.net/ - - - dom4j developer list - http://lists.sourceforge.net/lists/listinfo/dom4j-dev - http://lists.sourceforge.net/lists/listinfo/dom4j-dev - http://www.mail-archive.com/dom4j-dev%40lists.sourceforge.net/ - - - dom4j commits list - http://lists.sourceforge.net/lists/listinfo/dom4j-commits - http://lists.sourceforge.net/lists/listinfo/dom4j-commits - - - - - carnold - Curt Arnold - carnold@users.sourceforge.net - - - ddlucas - David Lucas - ddlucas@users.sourceforge.net - - - drwhite - David White - drwhite@users.sourceforge.net - - - jjenkov - Jakob Jenkov - jjenkov@users.sourceforge.net - - - jstrachan - James Strachan - jstrachan@apache.org - SpiritSoft, Inc. - - - laramiec - Laramie Crocker - laramiec@users.sourceforge.net - - - maartenc - Maarten Coene - maartenc@users.sourceforge.net - Cronos - - - mskells - Michael Skells - mskells@users.sourceforge.net - - - nicksanderson - Nick Sanderson - nicksanderson@users.sourceforge.net - - - slehmann - Steen Lehmann - slehmann@users.sourceforge.net - - - tradem - Tobias Rademacher - tradem@users.sourceforge.net - - - werken - Bob McWhirter - werken@users.sourceforge.net - - - wolfftw - Todd Wolff - wolfftw@users.sourceforge.net - - - yeekee - OuYang Chen - yeekee@users.sourceforge.net - - - yruan2 - Yuxin Ruan - yruan2@users.sourceforge.net - - - - scm:cvs:pserver:anonymous@cvs.sourceforge.net:/cvsroot/dom4j:dom4j - scm:cvs:ext:${maven.username}@cvs.sourceforge.net:/cvsroot/dom4j:dom4j - http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dom4j/dom4j/ - - - MetaStuff Ltd. - http://sourceforge.net/projects/dom4j - - - src/java - src/test - - - maven-surefire-plugin - - - **/*Test.java - - - - - - - - jaxme - jaxme-api - 0.3 - true - - - jaxen - jaxen - 1.1-beta-6 - true - - - msv - xsdlib - 20030807 - true - - - msv - relaxngDatatype - 20030807 - true - - - pull-parser - pull-parser - 2 - true - - - xpp3 - xpp3 - 1.1.3.3 - true - - - stax - stax-api - 1.0 - true - - - xml-apis - xml-apis - 1.0.b2 - - - junitperf - junitperf - 1.8 - test - - - stax - stax-ri - 1.0 - test - - - xerces - xercesImpl - 2.6.2 - test - - - xalan - xalan - 2.5.1 - test - - - - - default - Default Site - scp://dom4j.org//home/groups/d/do/dom4j/htdocs - - -
\ No newline at end of file diff --git a/dom4j-2.0.3.pom b/dom4j-2.0.3.pom new file mode 100644 index 0000000..d8958fb --- /dev/null +++ b/dom4j-2.0.3.pom @@ -0,0 +1,77 @@ + + + + + + + + 4.0.0 + org.dom4j + dom4j + 2.0.3 + dom4j + flexible XML framework for Java + http://dom4j.github.io/ + + + BSD 3-clause New License + https://github.com/dom4j/dom4j/blob/master/LICENSE + + + + + Filip Jirsák + filip@jirsak.org + https://github.com/FilipJirsak + + + + scm:git:git@github.com:dom4j/dom4j.git + scm:git:git@github.com:dom4j/dom4j.git + git@github.com:dom4j/dom4j.git + + + + jaxen + jaxen + 1.1.6 + runtime + true + + + javax.xml.stream + stax-api + 1.0-2 + runtime + true + + + net.java.dev.msv + xsdlib + 2013.6.1 + runtime + true + + + javax.xml.bind + jaxb-api + 2.2.12 + runtime + true + + + pull-parser + pull-parser + 2 + runtime + true + + + xpp3 + xpp3 + 1.1.4c + runtime + true + + + diff --git a/dom4j-2.0.3.tar.xz b/dom4j-2.0.3.tar.xz new file mode 100644 index 0000000..eb5beb8 --- /dev/null +++ b/dom4j-2.0.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2befe87fb264f5f04fa420414d5b35d2d3bc90937312078142021210e2633c12 +size 396540 diff --git a/dom4j-CVE-2018-1000632.patch b/dom4j-CVE-2018-1000632.patch deleted file mode 100644 index 788b519..0000000 --- a/dom4j-CVE-2018-1000632.patch +++ /dev/null @@ -1,259 +0,0 @@ -Index: dom4j/src/java/org/dom4j/Namespace.java -=================================================================== ---- dom4j.orig/src/java/org/dom4j/Namespace.java -+++ dom4j/src/java/org/dom4j/Namespace.java -@@ -51,6 +51,10 @@ public class Namespace extends AbstractN - public Namespace(String prefix, String uri) { - this.prefix = (prefix != null) ? prefix : ""; - this.uri = (uri != null) ? uri : ""; -+ -+ if (!this.prefix.isEmpty()) { -+ QName.validateNCName(this.prefix); -+ } - } - - /** -Index: dom4j/src/java/org/dom4j/QName.java -=================================================================== ---- dom4j.orig/src/java/org/dom4j/QName.java -+++ dom4j/src/java/org/dom4j/QName.java -@@ -11,6 +11,7 @@ import java.io.IOException; - import java.io.ObjectInputStream; - import java.io.ObjectOutputStream; - import java.io.Serializable; -+import java.util.regex.Pattern; - - import org.dom4j.tree.QNameCache; - import org.dom4j.util.SingletonStrategy; -@@ -20,6 +21,7 @@ import org.dom4j.util.SingletonStrategy; - * QName represents a qualified name value of an XML element or - * attribute. It consists of a local name and a {@link Namespace}instance. This - * object is immutable. -+ * @author Filip Jirsak - *

- * - * @author James Strachan -@@ -28,6 +30,81 @@ public class QName implements Serializab - /** The Singleton instance */ - private static SingletonStrategy singleton = null; - -+ /** -+ * {@code NameStartChar} without colon. -+ * -+ *
NameStartChar      ::=     ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
-+ * -+ * @see XML 1.0 - 2.3 Common Syntactic Constructs -+ * @see XML 1.1 - 2.3 Common Syntactic Constructs -+ */ -+ private static final String NAME_START_CHAR = "_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD"; -+ -+ /** -+ * {@code NameChar} without colon. -+ * -+ *
NameChar   ::=     NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
-+ * -+ * @see XML 1.0 - 2.3 Common Syntactic Constructs -+ * @see XML 1.1 - 2.3 Common Syntactic Constructs -+ */ -+ private static final String NAME_CHAR = NAME_START_CHAR + "-.0-9\u00B7\u0300-\u036F\u203F-\u2040"; -+ -+ /** -+ * {@code NCName} -+ * {@code NCName} -+ * -+ *
-+     * NCName          ::=     NCNameStartChar NCNameChar*     (An XML Name, minus the ":")
-+     * NCNameChar      ::=     NameChar -':'
-+     * NCNameStartChar ::=     NameStartChar -':'
-+     * 
-+ * -+ * @see Namespaces in XML 1.0 - 4 Qualified Names -+ * @see Namespaces in XML 1.1 - 4 Qualified Names -+ */ -+ private static final String NCNAME = "["+NAME_START_CHAR+"]["+NAME_CHAR+"]*"; -+ -+ /** -+ * Regular expression for {@code Name} (with colon). -+ * -+ *
Name       ::=     NameStartChar (NameChar)*
-+ * -+ * @see XML 1.0 - 2.3 Common Syntactic Constructs -+ * @see XML 1.1 - 2.3 Common Syntactic Constructs -+ */ -+ private static final Pattern RE_NAME = Pattern.compile("[:"+NAME_START_CHAR+"][:"+NAME_CHAR+"]*"); -+ -+ /** -+ * Regular expression for {@code NCName}. -+ * -+ *
-+     * NCName          ::=     NCNameStartChar NCNameChar*     (An XML Name, minus the ":")
-+     * NCNameChar      ::=     NameChar -':'
-+     * NCNameStartChar ::=     NameStartChar -':'
-+     * 
-+ * -+ * @see Namespaces in XML 1.0 - 4 Qualified Names -+ * @see Namespaces in XML 1.1 - 4 Qualified Names -+ */ -+ private static final Pattern RE_NCNAME = Pattern.compile(NCNAME); -+ -+ /** -+ * Regular expression for {@code QName}. -+ * -+ *
-+     * QName           ::=     PrefixedName | UnprefixedName
-+     * PrefixedName    ::=     Prefix ':' LocalPart
-+     * UnprefixedName  ::=     LocalPart
-+     * Prefix          ::=     NCName
-+     * LocalPart       ::=     NCName
-+     * 
-+ * -+ * @see Namespaces in XML 1.0 - 4 Qualified Names -+ * @see Namespaces in XML 1.1 - 4 Qualified Names -+ */ -+ private static final Pattern RE_QNAME = Pattern.compile("(?:"+NCNAME+":)?"+NCNAME); -+ - static { - try { - String defaultSingletonClass = "org.dom4j.util.SimpleSingleton"; -@@ -73,6 +150,11 @@ public class QName implements Serializab - this.name = (name == null) ? "" : name; - this.namespace = (namespace == null) ? Namespace.NO_NAMESPACE - : namespace; -+ if (this.namespace.equals(Namespace.NO_NAMESPACE)) { -+ validateName(this.name); -+ } else { -+ validateNCName(this.name); -+ } - } - - public QName(String name, Namespace namespace, String qualifiedName) { -@@ -80,6 +162,8 @@ public class QName implements Serializab - this.qualifiedName = qualifiedName; - this.namespace = (namespace == null) ? Namespace.NO_NAMESPACE - : namespace; -+ validateNCName(this.name); -+ validateQName(this.qualifiedName); - } - - public static QName get(String name) { -@@ -253,6 +337,24 @@ public class QName implements Serializab - QNameCache cache = (QNameCache) singleton.instance(); - return cache; - } -+ -+ private static void validateName(String name) { -+ if (!RE_NAME.matcher(name).matches()) { -+ throw new IllegalArgumentException(String.format("Illegal character in name: '%s'.", name)); -+ } -+ } -+ -+ protected static void validateNCName(String ncname) { -+ if (!RE_NCNAME.matcher(ncname).matches()) { -+ throw new IllegalArgumentException(String.format("Illegal character in local name: '%s'.", ncname)); -+ } -+ } -+ -+ private static void validateQName(String qname) { -+ if (!RE_QNAME.matcher(qname).matches()) { -+ throw new IllegalArgumentException(String.format("Illegal character in qualified name: '%s'.", qname)); -+ } -+ } - } - - -Index: dom4j/src/java/org/dom4j/tree/QNameCache.java -=================================================================== ---- dom4j.orig/src/java/org/dom4j/tree/QNameCache.java -+++ dom4j/src/java/org/dom4j/tree/QNameCache.java -@@ -164,6 +164,8 @@ public class QNameCache { - - if (index < 0) { - return get(qualifiedName, Namespace.get(uri)); -+ } else if (index == 0){ -+ throw new IllegalArgumentException("Qualified name cannot start with ':'."); - } else { - String name = qualifiedName.substring(index + 1); - String prefix = qualifiedName.substring(0, index); -Index: dom4j/src/test/org/dom4j/AllowedCharsTest.java -=================================================================== ---- /dev/null -+++ dom4j/src/test/org/dom4j/AllowedCharsTest.java -@@ -0,0 +1,78 @@ -+package org.dom4j;^M -+^M -+import org.testng.annotations.Test;^M -+^M -+/**^M -+ * @author Filip Jirsak^M -+ */^M -+public class AllowedCharsTest {^M -+ @Test^M -+ public void localName() {^M -+ QName.get("element");^M -+ QName.get(":element");^M -+ QName.get("elem:ent");^M -+ }^M -+^M -+ @Test(expectedExceptions = IllegalArgumentException.class)^M -+ public void localNameFail() {^M -+ QName.get("!element");^M -+ }^M -+^M -+ @Test^M -+ public void qname() {^M -+ QName.get("element", "http://example.com/namespace");^M -+ QName.get("ns:element", "http://example.com/namespace");^M -+ }^M -+^M -+ @Test(expectedExceptions = IllegalArgumentException.class)^M -+ public void qnameFail1() {^M -+ QName.get("ns:elem:ent", "http://example.com/namespace");^M -+ }^M -+^M -+ @Test(expectedExceptions = IllegalArgumentException.class)^M -+ public void qnameFail2() {^M -+ QName.get(":nselement", "http://example.com/namespace");^M -+ }^M -+^M -+ @Test(expectedExceptions = IllegalArgumentException.class)^M -+ public void createElementLT() {^M -+ DocumentHelper.createElement("elementname");^M -+ }^M -+^M -+ @Test(expectedExceptions = IllegalArgumentException.class)^M -+ public void createElementAmpersand() {^M -+ DocumentHelper.createElement("element&name");^M -+ }^M -+^M -+ @Test(expectedExceptions = IllegalArgumentException.class)^M -+ public void addElement() {^M -+ Element root = DocumentHelper.createElement("root");^M -+ root.addElement("element>name");^M -+ }^M -+^M -+ @Test(expectedExceptions = IllegalArgumentException.class)^M -+ public void addElementQualified() {^M -+ Element root = DocumentHelper.createElement("root");^M -+ root.addElement("element>name", "http://example.com/namespace");^M -+ }^M -+^M -+ @Test(expectedExceptions = IllegalArgumentException.class)^M -+ public void addElementQualifiedPrefix() {^M -+ Element root = DocumentHelper.createElement("root");^M -+ root.addElement("ns:element>name", "http://example.com/namespace");^M -+ }^M -+^M -+ @Test(expectedExceptions = IllegalArgumentException.class)^M -+ public void addElementPrefix() {^M -+ Element root = DocumentHelper.createElement("root");^M -+ root.addElement("ns>:element", "http://example.com/namespace");^M -+ }^M -+^M -+ //TODO It is illegal to create element or attribute with namespace prefix and empty namespace IRI.^M -+ //See https://www.w3.org/TR/2006/REC-xml-names11-20060816/#scoping^M -+}^M diff --git a/dom4j-CVE-2020-10683.patch b/dom4j-CVE-2020-10683.patch deleted file mode 100644 index 2c5724b..0000000 --- a/dom4j-CVE-2020-10683.patch +++ /dev/null @@ -1,484 +0,0 @@ -From a8228522a99a02146106672a34c104adbda5c658 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Filip=20Jirs=C3=A1k?= -Date: Sat, 11 Apr 2020 19:06:44 +0200 -Subject: [PATCH] SAXReader uses system default XMLReader with its defaults. - New factory method SAXReader.createDefault() sets more secure defaults. - ---- - src/java/org/dom4j/DocumentHelper.java | 65 +- - src/java/org/dom4j/io/SAXHelper.java | 37 +- - src/java/org/dom4j/io/SAXReader.java | 1824 ++++++++++--------- - 3 files changed, 973 insertions(+), 953 deletions(-) - -Index: dom4j/src/java/org/dom4j/io/SAXHelper.java -=================================================================== ---- dom4j.orig/src/java/org/dom4j/io/SAXHelper.java -+++ dom4j/src/java/org/dom4j/io/SAXHelper.java -@@ -13,6 +13,8 @@ import org.xml.sax.SAXNotSupportedExcept - import org.xml.sax.XMLReader; - import org.xml.sax.helpers.XMLReaderFactory; - -+import javax.xml.parsers.SAXParserFactory; -+ - /** - *

- * SAXHelper contains some helper methods for working with SAX -@@ -59,9 +61,18 @@ class SAXHelper { - } - - /** -- * Creats a default XMLReader via the org.xml.sax.driver system property or -+ * Creates a default XMLReader via the org.xml.sax.driver system property or - * JAXP if the system property is not set. - * -+ * This method internally calls {@link SAXParserFactory}{@code .newInstance().newSAXParser().getXMLReader()} or {@link XMLReaderFactory#createXMLReader()}. -+ * Be sure to configure returned reader if the default configuration does not suit you. Consider setting the following properties: -+ * -+ *

-+     * reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
-+     * reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
-+     * reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
-+     * 
-+ * - * @param validating - * DOCUMENT ME! - * -Index: dom4j/src/java/org/dom4j/io/SAXReader.java -=================================================================== ---- dom4j.orig/src/java/org/dom4j/io/SAXReader.java -+++ dom4j/src/java/org/dom4j/io/SAXReader.java -@@ -30,6 +30,8 @@ import org.xml.sax.XMLReader; - import org.xml.sax.helpers.DefaultHandler; - import org.xml.sax.helpers.XMLReaderFactory; - -+import javax.xml.parsers.SAXParserFactory; -+ - /** - *

- * SAXReader creates a DOM4J tree from SAX parsing events. -@@ -135,17 +137,76 @@ public class SAXReader { - /** The SAX filter used to filter SAX events */ - private XMLFilter xmlFilter; - -+ public static SAXReader createDefault() { -+ SAXReader reader = new SAXReader(); -+ try { -+ reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); -+ reader.setFeature("http://xml.org/sax/features/external-general-entities", false); -+ reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false); -+ } catch (SAXException e) { -+ // nothing to do, incompatible reader -+ } -+ return reader; -+ } -+ -+ /** -+ * This method internally calls {@link SAXParserFactory}{@code .newInstance().newSAXParser().getXMLReader()} or {@link XMLReaderFactory#createXMLReader()}. -+ * Be sure to configure returned reader if the default configuration does not suit you. Consider setting the following properties: -+ * -+ *

-+     * reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
-+     * reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
-+     * reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
-+     * 
-+ */ - public SAXReader() { - } - -+ /** -+ * This method internally calls {@link SAXParserFactory}{@code .newInstance().newSAXParser().getXMLReader()} or {@link XMLReaderFactory#createXMLReader()}. -+ * Be sure to configure returned reader if the default configuration does not suit you. Consider setting the following properties: -+ * -+ *
-+     * reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
-+     * reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
-+     * reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
-+     * 
-+ * -+ * @param validating -+ */ - public SAXReader(boolean validating) { - this.validating = validating; - } - -+ /** -+ * This method internally calls {@link SAXParserFactory}{@code .newInstance().newSAXParser().getXMLReader()} or {@link XMLReaderFactory#createXMLReader()}. -+ * Be sure to configure returned reader if the default configuration does not suit you. Consider setting the following properties: -+ * -+ *
-+     * reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
-+     * reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
-+     * reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
-+     * 
-+ * -+ * @param factory -+ */ - public SAXReader(DocumentFactory factory) { - this.factory = factory; - } - -+ /** -+ * This method internally calls {@link SAXParserFactory}{@code .newInstance().newSAXParser().getXMLReader()} or {@link XMLReaderFactory#createXMLReader()}. -+ * Be sure to configure returned reader if the default configuration does not suit you. Consider setting the following properties: -+ * -+ *
-+     * reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
-+     * reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
-+     * reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
-+     * 
-+ * -+ * @param factory -+ * @param validating -+ */ - public SAXReader(DocumentFactory factory, boolean validating) { - this.factory = factory; - this.validating = validating; -@@ -185,14 +246,10 @@ public class SAXReader { - * this method is to correctly configure an XMLReader object instance and - * call the {@link #setXMLReader(XMLReader)}method - * -- * @param name -- * is the SAX property name -- * @param value -- * is the value of the SAX property -- * -- * @throws SAXException -- * if the XMLReader could not be created or the property could -- * not be changed. -+ * @param name is the SAX property name -+ * @param value is the value of the SAX property -+ * @throws SAXException if the XMLReader could not be created or the property could -+ * not be changed. - */ - public void setProperty(String name, Object value) throws SAXException { - getXMLReader().setProperty(name, value); -@@ -205,14 +262,10 @@ public class SAXReader { - * calling this method is to correctly configure an XMLReader object - * instance and call the {@link #setXMLReader(XMLReader)}method - * -- * @param name -- * is the SAX feature name -- * @param value -- * is the value of the SAX feature -- * -- * @throws SAXException -- * if the XMLReader could not be created or the feature could -- * not be changed. -+ * @param name is the SAX feature name -+ * @param value is the value of the SAX feature -+ * @throws SAXException if the XMLReader could not be created or the feature could -+ * not be changed. - */ - public void setFeature(String name, boolean value) throws SAXException { - getXMLReader().setFeature(name, value); -@@ -223,13 +276,9 @@ public class SAXReader { - * Reads a Document from the given File - *

- * -- * @param file -- * is the File to read from. -- * -+ * @param file is the File to read from. - * @return the newly created Document instance -- * -- * @throws DocumentException -- * if an error occurs during parsing. -+ * @throws DocumentException if an error occurs during parsing. - */ - public Document read(File file) throws DocumentException { - try { -@@ -272,13 +321,9 @@ public class SAXReader { - * Reads a Document from the given URL using SAX - *

- * -- * @param url -- * URL to read from. -- * -+ * @param url URL to read from. - * @return the newly created Document instance -- * -- * @throws DocumentException -- * if an error occurs during parsing. -+ * @throws DocumentException if an error occurs during parsing. - */ - public Document read(URL url) throws DocumentException { - String systemID = url.toExternalForm(); -@@ -304,13 +349,9 @@ public class SAXReader { - * String} to denote the source of the document. - *

- * -- * @param systemId -- * is a URL for a document or a file name. -- * -+ * @param systemId is a URL for a document or a file name. - * @return the newly created Document instance -- * -- * @throws DocumentException -- * if an error occurs during parsing. -+ * @throws DocumentException if an error occurs during parsing. - */ - public Document read(String systemId) throws DocumentException { - InputSource source = new InputSource(systemId); -@@ -326,13 +367,9 @@ public class SAXReader { - * Reads a Document from the given stream using SAX - *

- * -- * @param in -- * InputStream to read from. -- * -+ * @param in InputStream to read from. - * @return the newly created Document instance -- * -- * @throws DocumentException -- * if an error occurs during parsing. -+ * @throws DocumentException if an error occurs during parsing. - */ - public Document read(InputStream in) throws DocumentException { - InputSource source = new InputSource(in); -@@ -348,13 +385,9 @@ public class SAXReader { - * Reads a Document from the given Reader using SAX - *

- * -- * @param reader -- * is the reader for the input -- * -+ * @param reader is the reader for the input - * @return the newly created Document instance -- * -- * @throws DocumentException -- * if an error occurs during parsing. -+ * @throws DocumentException if an error occurs during parsing. - */ - public Document read(Reader reader) throws DocumentException { - InputSource source = new InputSource(reader); -@@ -370,15 +403,10 @@ public class SAXReader { - * Reads a Document from the given stream using SAX - *

- * -- * @param in -- * InputStream to read from. -- * @param systemId -- * is the URI for the input -- * -+ * @param in InputStream to read from. -+ * @param systemId is the URI for the input - * @return the newly created Document instance -- * -- * @throws DocumentException -- * if an error occurs during parsing. -+ * @throws DocumentException if an error occurs during parsing. - */ - public Document read(InputStream in, String systemId) - throws DocumentException { -@@ -396,13 +424,9 @@ public class SAXReader { - * Reads a Document from the given Reader using SAX - *

- * -- * @param reader -- * is the reader for the input -- * @param systemId -- * is the URI for the input -- * -+ * @param reader is the reader for the input -+ * @param systemId is the URI for the input - * @return the newly created Document instance -- * - * @throws DocumentException - * if an error occurs during parsing. - */ -@@ -422,13 +446,9 @@ public class SAXReader { - * Reads a Document from the given InputSource using SAX - *

- * -- * @param in -- * InputSource to read from. -- * -+ * @param in InputSource to read from. - * @return the newly created Document instance -- * -- * @throws DocumentException -- * if an error occurs during parsing. -+ * @throws DocumentException if an error occurs during parsing. - */ - public Document read(InputSource in) throws DocumentException { - try { -@@ -695,8 +715,7 @@ public class SAXReader { - /** - * Sets the entity resolver used to resolve entities. - * -- * @param entityResolver -- * DOCUMENT ME! -+ * @param entityResolver DOCUMENT ME! - */ - public void setEntityResolver(EntityResolver entityResolver) { - this.entityResolver = entityResolver; -@@ -706,9 +725,7 @@ public class SAXReader { - * DOCUMENT ME! - * - * @return the XMLReader used to parse SAX events -- * -- * @throws SAXException -- * DOCUMENT ME! -+ * @throws SAXException DOCUMENT ME! - */ - public XMLReader getXMLReader() throws SAXException { - if (xmlReader == null) { -@@ -721,8 +738,7 @@ public class SAXReader { - /** - * Sets the XMLReader used to parse SAX events - * -- * @param reader -- * is the XMLReader to parse SAX events -+ * @param reader is the XMLReader to parse SAX events - */ - public void setXMLReader(XMLReader reader) { - this.xmlReader = reader; -@@ -742,8 +758,7 @@ public class SAXReader { - /** - * Sets encoding used for InputSource (null means system default encoding) - * -- * @param encoding -- * is encoding used for InputSource -+ * @param encoding is encoding used for InputSource - */ - public void setEncoding(String encoding) { - this.encoding = encoding; -@@ -753,12 +768,9 @@ public class SAXReader { - * Sets the class name of the XMLReader to be used to parse - * SAX events. - * -- * @param xmlReaderClassName -- * is the class name of the XMLReader to parse SAX -- * events -- * -- * @throws SAXException -- * DOCUMENT ME! -+ * @param xmlReaderClassName is the class name of the XMLReader -+ * to parse SAX events -+ * @throws SAXException DOCUMENT ME! - */ - public void setXMLReaderClassName(String xmlReaderClassName) - throws SAXException { -@@ -769,11 +781,9 @@ public class SAXReader { - * Adds the ElementHandler to be called when the specified - * path is encounted. - * -- * @param path -- * is the path to be handled -- * @param handler -- * is the ElementHandler to be called by the event -- * based processor. -+ * @param path is the path to be handled -+ * @param handler is the ElementHandler to be called by the event -+ * based processor. - */ - public void addHandler(String path, ElementHandler handler) { - getDispatchHandler().addHandler(path, handler); -@@ -783,8 +793,7 @@ public class SAXReader { - * Removes the ElementHandler from the event based processor, - * for the specified path. - * -- * @param path -- * is the path to remove the ElementHandler for. -+ * @param path is the path to remove the ElementHandler for. - */ - public void removeHandler(String path) { - getDispatchHandler().removeHandler(path); -@@ -795,9 +804,8 @@ public class SAXReader { - * registered, this will set a default ElementHandler to be - * called for any path which does NOT have a handler registered. - * -- * @param handler -- * is the ElementHandler to be called by the event -- * based processor. -+ * @param handler is the ElementHandler to be called by the event -+ * based processor. - */ - public void setDefaultHandler(ElementHandler handler) { - getDispatchHandler().setDefaultHandler(handler); -@@ -824,8 +832,7 @@ public class SAXReader { - /** - * Sets the SAX filter to be used when filtering SAX events - * -- * @param filter -- * is the SAX filter to use or null to disable filtering -+ * @param filter is the SAX filter to use or null to disable filtering - */ - public void setXMLFilter(XMLFilter filter) { - this.xmlFilter = filter; -@@ -838,9 +845,7 @@ public class SAXReader { - * Installs any XMLFilter objects required to allow the SAX event stream to - * be filtered and preprocessed before it gets to dom4j. - * -- * @param reader -- * DOCUMENT ME! -- * -+ * @param reader DOCUMENT ME! - * @return the new XMLFilter if applicable or the original XMLReader if no - * filter is being used. - */ -@@ -886,9 +891,7 @@ public class SAXReader { - * XMLReader objects - * - * @return DOCUMENT ME! -- * -- * @throws SAXException -- * DOCUMENT ME! -+ * @throws SAXException DOCUMENT ME! - */ - protected XMLReader createXMLReader() throws SAXException { - return SAXHelper.createXMLReader(isValidating()); -@@ -897,13 +900,9 @@ public class SAXReader { - /** - * Configures the XMLReader before use - * -- * @param reader -- * DOCUMENT ME! -- * @param handler -- * DOCUMENT ME! -- * -- * @throws DocumentException -- * DOCUMENT ME! -+ * @param reader DOCUMENT ME! -+ * @param handler DOCUMENT ME! -+ * @throws DocumentException DOCUMENT ME! - */ - protected void configureReader(XMLReader reader, DefaultHandler handler) - throws DocumentException { -@@ -918,10 +917,11 @@ public class SAXReader { - SAXHelper.setParserProperty(reader, SAX_DECL_HANDLER, handler); - } - -- // configure namespace support -- SAXHelper.setParserFeature(reader, SAX_NAMESPACES, true); -+ // // configure namespace support -+ // SAXHelper.setParserFeature(reader, SAX_NAMESPACES, true); - -- SAXHelper.setParserFeature(reader, SAX_NAMESPACE_PREFIXES, false); -+ // string interning -+ // SAXHelper.setParserFeature(reader, SAX_NAMESPACE_PREFIXES, false); - - // string interning - SAXHelper.setParserFeature(reader, SAX_STRING_INTERNING, -@@ -936,8 +936,8 @@ public class SAXReader { - * includeExternalParameterEntities ); - */ - // use Locator2 if possible -- SAXHelper.setParserFeature(reader, -- "http://xml.org/sax/features/use-locator2", true); -+ // SAXHelper.setParserFeature(reader, -+ // "http://xml.org/sax/features/use-locator2", true); - - try { - // configure validation support -@@ -960,9 +960,7 @@ public class SAXReader { - /** - * Factory Method to allow user derived SAXContentHandler objects to be used - * -- * @param reader -- * DOCUMENT ME! -- * -+ * @param reader DOCUMENT ME! - * @return DOCUMENT ME! - */ - protected SAXContentHandler createContentHandler(XMLReader reader) { diff --git a/dom4j-build.xml b/dom4j-build.xml new file mode 100644 index 0000000..4987681 --- /dev/null +++ b/dom4j-build.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dom4j-enable-stax-datatypes.patch b/dom4j-enable-stax-datatypes.patch deleted file mode 100644 index 5b4f8a5..0000000 --- a/dom4j-enable-stax-datatypes.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: dom4j/build.xml -=================================================================== ---- dom4j.orig/build.xml -+++ dom4j/build.xml -@@ -146,9 +146,6 @@ - source="8" - deprecation="${deprecation}" - classpathref="compile.classpath"> -- -- -- - - - diff --git a/dom4j-javadoc.patch b/dom4j-javadoc.patch deleted file mode 100644 index 895211b..0000000 --- a/dom4j-javadoc.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- dom4j/build.xml 2009-05-12 15:04:18.000000000 +0200 -+++ dom4j/build.xml 2018-07-10 10:51:51.814095475 +0200 -@@ -224,7 +224,6 @@ - doctitle="${Name}" - bottom="Copyright © ${year} MetaStuff Ltd. All Rights Reserved. Hosted by <p> <img src='http://sourceforge.net/sflogo.php?group_id=16035' width='88' height='31' border='0' alt='SourceForge Logo' />" - stylesheetfile="${doc.dir}/style/javadoc.css"> -- - - - -@@ -240,8 +239,6 @@ - doctitle="${Name}" - bottom="Copyright © ${year} MetaStuff Ltd. All Rights Reserved. Hosted by <p> <img src='http://sourceforge.net/sflogo.php?group_id=16035' width='88' height='31' border='0' alt='SourceForge Logo' />" - stylesheetfile="${doc.dir}/style/javadoc.css"> -- -- - - - diff --git a/dom4j-sourcetarget.patch b/dom4j-sourcetarget.patch deleted file mode 100644 index 1644b75..0000000 --- a/dom4j-sourcetarget.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- dom4j/build.xml 2009-05-12 15:04:18.000000000 +0200 -+++ dom4j/build.xml 2017-09-11 13:36:05.252661089 +0200 -@@ -142,8 +142,8 @@ - destdir="${build.dest}" - debug="${debug}" - optimize="${optimize}" -- target="1.3" -- source="1.3" -+ target="8" -+ source="8" - deprecation="${deprecation}" - classpathref="compile.classpath"> - -@@ -195,6 +195,7 @@ - - - - = 1.6.5 -BuildRequires: ant-apache-resolver -BuildRequires: ant-junit -BuildRequires: bea-stax +Summary: Open Source XML framework for Java +License: BSD-3-Clause +URL: https://dom4j.github.io/ +Source0: %{name}-%{version}.tar.xz +Source1: https://repo1.maven.org/maven2/org/%{name}/%{name}/%{version}/%{name}-%{version}.pom +Source2: %{name}-build.xml +BuildRequires: ant BuildRequires: fdupes BuildRequires: glassfish-jaxb-api -BuildRequires: isorelax -BuildRequires: java-devel >= 1.6 -# Needed for maven conversions BuildRequires: javapackages-local -BuildRequires: javapackages-tools -BuildRequires: jaxen-bootstrap >= 1.1 -BuildRequires: junit -BuildRequires: junitperf -BuildRequires: relaxngDatatype -BuildRequires: stax_1_0_api -BuildRequires: ws-jaxme -BuildRequires: xalan-j2 >= 2.7 -BuildRequires: xerces-j2 -BuildRequires: xpp2 -BuildRequires: xpp3 -Requires: bea-stax -Requires: glassfish-jaxb-api -Requires: isorelax -Requires: java >= 1.6.0 -Requires: jaxen >= 1.1 -Requires: relaxngDatatype -Requires: stax_1_0_api -Requires: ws-jaxme -Requires: xalan-j2 -Requires: xerces-j2 -Requires: xpp2 -Requires: xpp3 -#Requires: jaxp = 1.2 -Requires(post): javapackages-tools -Requires(postun):javapackages-tools +BuildRequires: jaxen-bootstrap +Obsoletes: %{name}-manual < %{version} BuildArch: noarch %description -dom4j is an easy to use Open Source XML, XPath and XSLT framework for -Java using the Java Collections Framework. dom4j allows you to read, +dom4j is an Open Source XML framework for Java. dom4j allows you to read, write, navigate, create and modify XML documents. dom4j integrates with -DOM, SAX and JAXP and is seamlessly integrated with full XPath support. +DOM and SAX and is seamlessly integrated with full XPath support. %package demo -Summary: XML, XPath and XSLT library for Java +Summary: Open Source XML framework for Java - demo Group: Development/Libraries/Java Requires: %{name} = %{version} %description demo -dom4j is an easy to use Open Source XML, XPath and XSLT framework for -Java using the Java Collections Framework. dom4j allows you to read, +dom4j is an Open Source XML framework for Java. dom4j allows you to read, write, navigate, create and modify XML documents. dom4j integrates with -DOM, SAX and JAXP and is seamlessly integrated with full XPath support. - -%package manual -Summary: JarJar of dom4j for JBoss -Group: Development/Libraries/Java - -%description manual -dom4j is an easy to use Open Source XML, XPath and XSLT framework for -Java using the Java Collections Framework. dom4j allows you to read, -write, navigate, create and modify XML documents. dom4j integrates with -DOM, SAX and JAXP and is seamlessly integrated with full XPath support. +DOM and SAX and is seamlessly integrated with full XPath support. %package javadoc -Summary: XML, XPath and XSLT library for Java -Group: Development/Libraries/Java +Summary: Javadoc for %{name} %description javadoc -dom4j is an easy to use Open Source XML, XPath and XSLT framework for -Java using the Java Collections Framework. dom4j allows you to read, -write, navigate, create and modify XML documents. dom4j integrates with -DOM, SAX and JAXP and is seamlessly integrated with full XPath support. +Javadoc for %{name}. %prep -%setup -q -n %{name} -# replace run.sh -cp %{SOURCE1} run.sh -cp %{SOURCE2} pom.xml -%pom_add_dep javax.xml.bind:jaxb-api pom.xml "true" +%autosetup -p1 -rm -f src/test/org/dom4j/xpath/MatrixConcatTest.java -# won't succeed in headless environment -rm src/test/org/dom4j/bean/BeansTest.java -# FIXME Bug in Xalan 2.6 -- reactivate with Xalan 2.7 -#rm src/test/org/dom4j/XPathExamplesTest.java -# fix for deleted jars -sed -i -e '/unjar/d' -e 's|,cookbook/\*\*,|,|' build.xml -# FIXME: (yyang): failed in JDK6 -rm -f src/test/org/dom4j/ThreadingTest.java -# FIXME: (yyang): failed in JDK6, maybe failed to load russArticle.xml because it's russian encoding -rm -f src/test/org/dom4j/io/StaxTest.java -%patch0 -p1 -b .bug1618750 -%patch1 -p1 -b .sourcetarget -%patch2 -p1 -b .javadoc -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -perl -pi -e 's/\r//g' LICENSE.txt docs/clover/*.css docs/style/*.css docs/xref/*.css docs/xref-test/*.css src/doc/style/*.css docs/benchmarks/xpath/*.java +cp %{SOURCE1} pom.xml +cp %{SOURCE2} build.xml -pushd lib -ln -sf $(build-classpath xpp2) -ln -sf $(build-classpath relaxngDatatype) -ln -sf $(build-classpath jaxme/jaxmeapi) -#ln -sf $(build-classpath msv-xsdlib) -#ln -sf $(build-classpath msv-msv) -ln -sf $(build-classpath jaxen) -ln -sf $(build-classpath bea-stax-api) -pushd test -ln -sf $(build-classpath bea-stax-ri) -ln -sf $(build-classpath junitperf) -ln -sf $(build-classpath junit) -popd -ln -sf $(build-classpath xpp3) -pushd tools -ln -sf $(build-classpath jaxme/jaxmexs) -ln -sf $(build-classpath xalan-j2) -ln -sf $(build-classpath xalan-j2-serializer) -ln -sf $(build-classpath jaxme/jaxmejs) -ln -sf $(build-classpath isorelax) -ln -sf $(build-classpath jaxme/jaxme2) -ln -sf $(build-classpath xerces-j2) -popd -popd +# Remove xpp2 support +rm -r src/main/java/org/dom4j/xpp +rm src/main/java/org/dom4j/io/XPPReader.java + +# Remove datatype code which depends on msv +rm -r src/main/java/org/dom4j/datatype +%pom_remove_dep net.java.dev.msv:xsdlib + +# Remove xpp3 support +rm src/main/java/org/dom4j/io/XPP3Reader.java +%pom_remove_dep xpp3:xpp3 +%pom_remove_dep pull-parser:pull-parser +%pom_remove_dep javax.xml.stream:stax-api %build -export CLASSPATH=$(build-classpath \ - glassfish-jaxb-api \ - jaxen relaxngDatatype xpp3 xpp2) -export OPT_JAR_LIST="junit ant/ant-junit" -rm -rf src/java/org/dom4j/datatype -ant package release-javadoc +mkdir -p lib +build-jar-repository -s lib jaxen glassfish-jaxb-api +%{ant} jar javadoc %install -# jars -install -d -m 755 %{buildroot}%{_javadir} -install -d -m 755 %{buildroot}%{_datadir}/maven2/poms -cp -p build/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar -mkdir -p %{buildroot}/%{_mavenpomdir} -install -m 644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP-%{name}.pom -%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "org.dom4j:dom4j" +# jar +install -dm 0755 %{buildroot}%{_javadir} +install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar + +# pom +install -dm 0755 %{buildroot}%{_mavenpomdir} +%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom +%add_maven_depmap %{name}.pom %{name}.jar -a %{name}:%{name} # javadoc -mkdir -p %{buildroot}%{_javadocdir}/%{name} -cp -pr build/doc/javadoc/* %{buildroot}%{_javadocdir}/%{name} -# manual -mkdir -p %{buildroot}%{_docdir}/%{name}-%{version} -rm -rf docs/apidocs -cp -pr docs/* %{buildroot}%{_docdir}/%{name}-%{version} +install -dm 0755 %{buildroot}%{_javadocdir}/%{name} +cp -r target/site/apidocs %{buildroot}%{_javadocdir}/%{name} +%fdupes -s %{buildroot}%{_javadocdir} + # demo -mkdir -p %{buildroot}%{_datadir}/%{name}/classes/org/dom4j +install -dm 0755 %{buildroot}%{_datadir}/%{name}/src cp -pr xml %{buildroot}%{_datadir}/%{name} -mkdir -p %{buildroot}%{_datadir}/%{name}/src -cp -pr src/samples %{buildroot}%{_datadir}/%{name}/src -#cp -pr build/classes/org/dom4j/samples $RPM_BUILD_ROOT%%{_datadir}/%%{name}/classes/org/dom4j -install -m 0755 run.sh %{buildroot}%{_datadir}/%{name} -%fdupes -s %{buildroot}%{_javadocdir}/%{name} -%fdupes -s %{buildroot}%{_docdir}/%{name}-%{version} +cp -pr src/example %{buildroot}%{_datadir}/%{name}/src %fdupes -s %{buildroot}%{_datadir}/%{name} %files -f .mfiles -%license LICENSE.txt - -%files javadoc -%defattr(0644,root,root,0755) -%{_javadocdir}/%{name} - -%files manual -%defattr(0644,root,root,0755) -%{_docdir}/%{name}-%{version} +%license LICENSE +%doc README.md %files demo -%defattr(-,root,root,0755) %{_datadir}/%{name} +%files javadoc +%license LICENSE +%{_javadocdir}/%{name} + %changelog diff --git a/dom4j_rundemo.sh b/dom4j_rundemo.sh deleted file mode 100644 index d2bb912..0000000 --- a/dom4j_rundemo.sh +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/sh - -XMLFMTOPS="-indentSize 2 -trimText -newlines" - -if [ $# -eq 0 ]; then -echo PullParserDemo -echo ./run.sh samples.PullParserDemo $XMLFMTOPS xml/web.xml -echo ./run.sh samples.PullParserDemo $XMLFMTOPS xml/fibo.xml -echo -echo SAXDemo -echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/web.xml -echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/test/test_schema.xml -echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/xhtml/xhtml-basic.xml -echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/contents.xml -echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/cdata.xml -echo ./run.sh -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser samples.SAXDemo $XMLFMTOPS xml/cdata.xml -echo ./run.sh -Dorg.xml.sax.driver=xml.aelfred2.SAXDriver samples.SAXDemo $XMLFMTOPS xml/cdata.xml -echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/testPI.xml -echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/namespaces.xml -echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/testNamespaces.xml -echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/inline.xml -echo -echo DOMDemo -echo ./run.sh samples.dom.DOMDemo xml/contents.xml -echo -echo SAXDOMDemo -echo ./run.sh samples.dom.SAXDOMDemo xml/contents.xml -echo -echo VisitorDemo -echo ./run.sh samples.VisitorDemo xml/cdata.xml -echo -echo CountDemo -echo ./run.sh samples.CountDemo xml/fibo.xml -echo -echo CreateXMLDemo -echo ./run.sh samples.CreateXMLDemo -echo -echo HTMLWriterDemo -echo ./run.sh samples.HTMLWriterDemo xml/xhtml.xml -echo -echo PerformanceTest -echo ./run.sh -Xprof samples.performance.PerformanceSupport xml/periodic_table.xml org.dom4j.DocumentFactory 10 -echo ./run.sh -Xprof -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser samples.performance.PerformanceSupport xml/periodic_table.xml org.dom4j.DocumentFactory 10 -echo ./run.sh -Xprof -Dorg.xml.sax.driver=xml.aelfred2.SAXDriver samples.performance.PerformanceSupport xml/periodic_table.xml org.dom4j.DocumentFactory 10 -echo ./run.sh -Xprof samples.performance.PerformanceSupport xml/much_ado.xml org.dom4j.DocumentFactory 10 -echo ./run.sh -Xprof -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser samples.performance.PerformanceSupport xml/much_ado.xml org.dom4j.DocumentFactory 10 -echo ./run.sh -Xprof -Dorg.xml.sax.driver=xml.aelfred2.SAXDriver samples.performance.PerformanceSupport xml/much_ado.xml org.dom4j.DocumentFactory 10 -echo -echo XPathDemo -echo ./run.sh samples.XPathDemo xml/web.xml //servlet/servlet-class -echo ./run.sh samples.XPathDemo xml/much_ado.xml //ACT/TITLE -echo -echo XSLTDemo -echo ./run.sh samples.XSLTDemo xml/nitf/sample.xml xml/nitf/ashtml.xsl -echo -echo XSLTNativeDOMDemo -echo ./run.sh samples.dom.XSLTNativeDOMDemo xml/nitf/sample.xml xml/nitf/ashtml.xsl -echo -echo LargeDocumentDemo -echo ./run.sh samples.LargeDocumentDemo xml/much_ado.xml /PLAY/ACT -echo -echo LargeDocumentDemo2 -echo ./run.sh samples.LargeDocumentDemo2 xml/much_ado.xml -echo -echo LinkCheckerDemo -echo ./run.sh samples.LinkChecker xml/xhtml/xhtml-basic.xml -echo -echo BeanDemo -echo ./run.sh samples.bean.BeanDemo xml/bean/gui.xml -echo -echo SAXValidatorDemo -echo ./run.sh samples.validate.SAXValidatorDemo xml/nitf/invalid.xml -echo -echo VisitorDemo -echo ./run.sh -Dorg.dom4j.factory=org.dom4j.datatype.DatatypeDocumentFactory samples.VisitorDemo xml/schema/personal-schema.xml -echo -echo JTableDemo -echo ./run.sh samples.swing.JTableDemo xml/web.xml -echo -echo JTableTool -echo ./run.sh samples.swing.JTableTool xml/swing/tableForAtoms.xml xml/periodic_table.xml -echo -echo JTreeDemo -echo ./run.sh samples.swing.JTreeDemo xml/web.xml -exit 0 -fi - -if [ -z "$JAVA_HOME" ] ; then - JAVA=`which java` - if [ -z "$JAVA" ] ; then - echo "Cannot find JAVA. Please set your PATH." - exit 1 - fi - JAVA_BIN=`dirname $JAVA` - JAVA_HOME=$JAVA_BIN/.. -fi - -JAVA=$JAVA_HOME/bin/java - -CLASSPATH=`build-classpath \ -dom4j \ -xpp2 \ -fop \ -xerces-j2 \ -msv-relaxngDatatype \ -msv-xsdlib \ -msv-isorelax \ -msv \ -jaxen \ -junit \ -junitperf \ -saxpath \ -xalan-j2 \ -xml-commons-apis \ -avalon-framework \ -avalon-logkit \ -`:$CLASSPATH - -BOOTCLASSPATH=`build-classpath \ -xml-commons-apis \ -xerces-j2 \ -xalan-j2 \ -` - -CLASSPATH=classes:$CLASSPATH:$JAVA_HOME/lib/tools.jar - - -$JAVA -Xbootclasspath/p:$BOOTCLASSPATH -classpath $CLASSPATH "$@"