|
|
726c2f |
#!/bin/sh
|
|
|
726c2f |
|
|
|
726c2f |
XMLFMTOPS="-indentSize 2 -trimText -newlines"
|
|
|
726c2f |
|
|
|
726c2f |
if [ $# -eq 0 ]; then
|
|
|
726c2f |
echo PullParserDemo
|
|
|
726c2f |
echo ./run.sh samples.PullParserDemo $XMLFMTOPS xml/web.xml
|
|
|
726c2f |
echo ./run.sh samples.PullParserDemo $XMLFMTOPS xml/fibo.xml
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo SAXDemo
|
|
|
726c2f |
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/web.xml
|
|
|
726c2f |
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/test/test_schema.xml
|
|
|
726c2f |
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/xhtml/xhtml-basic.xml
|
|
|
726c2f |
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/contents.xml
|
|
|
726c2f |
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/cdata.xml
|
|
|
726c2f |
echo ./run.sh -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser samples.SAXDemo $XMLFMTOPS xml/cdata.xml
|
|
|
726c2f |
echo ./run.sh -Dorg.xml.sax.driver=xml.aelfred2.SAXDriver samples.SAXDemo $XMLFMTOPS xml/cdata.xml
|
|
|
726c2f |
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/testPI.xml
|
|
|
726c2f |
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/namespaces.xml
|
|
|
726c2f |
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/testNamespaces.xml
|
|
|
726c2f |
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/inline.xml
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo DOMDemo
|
|
|
726c2f |
echo ./run.sh samples.dom.DOMDemo xml/contents.xml
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo SAXDOMDemo
|
|
|
726c2f |
echo ./run.sh samples.dom.SAXDOMDemo xml/contents.xml
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo JTidyDemo
|
|
|
726c2f |
echo ./run.sh samples.JTidyDemo $XMLFMTOPS readme.html
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo VisitorDemo
|
|
|
726c2f |
echo ./run.sh samples.VisitorDemo xml/cdata.xml
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo CountDemo
|
|
|
726c2f |
echo ./run.sh samples.CountDemo xml/fibo.xml
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo CreateXMLDemo
|
|
|
726c2f |
echo ./run.sh samples.CreateXMLDemo
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo HTMLWriterDemo
|
|
|
726c2f |
echo ./run.sh samples.HTMLWriterDemo xml/xhtml.xml
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo PerformanceTest
|
|
|
726c2f |
echo ./run.sh -Xprof samples.performance.PerformanceSupport xml/periodic_table.xml org.dom4j.DocumentFactory 10
|
|
|
726c2f |
echo ./run.sh -Xprof -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser samples.performance.PerformanceSupport xml/periodic_table.xml org.dom4j.DocumentFactory 10
|
|
|
726c2f |
echo ./run.sh -Xprof -Dorg.xml.sax.driver=xml.aelfred2.SAXDriver samples.performance.PerformanceSupport xml/periodic_table.xml org.dom4j.DocumentFactory 10
|
|
|
726c2f |
echo ./run.sh -Xprof samples.performance.PerformanceSupport xml/much_ado.xml org.dom4j.DocumentFactory 10
|
|
|
726c2f |
echo ./run.sh -Xprof -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser samples.performance.PerformanceSupport xml/much_ado.xml org.dom4j.DocumentFactory 10
|
|
|
726c2f |
echo ./run.sh -Xprof -Dorg.xml.sax.driver=xml.aelfred2.SAXDriver samples.performance.PerformanceSupport xml/much_ado.xml org.dom4j.DocumentFactory 10
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo XPathDemo
|
|
|
726c2f |
echo ./run.sh samples.XPathDemo xml/web.xml //servlet/servlet-class
|
|
|
726c2f |
echo ./run.sh samples.XPathDemo xml/much_ado.xml //ACT/TITLE
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo XSLTDemo
|
|
|
726c2f |
echo ./run.sh samples.XSLTDemo xml/nitf/sample.xml xml/nitf/ashtml.xsl
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo XSLTNativeDOMDemo
|
|
|
726c2f |
echo ./run.sh samples.dom.XSLTNativeDOMDemo xml/nitf/sample.xml xml/nitf/ashtml.xsl
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo LargeDocumentDemo
|
|
|
726c2f |
echo ./run.sh samples.LargeDocumentDemo xml/much_ado.xml /PLAY/ACT
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo LargeDocumentDemo2
|
|
|
726c2f |
echo ./run.sh samples.LargeDocumentDemo2 xml/much_ado.xml
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo LinkCheckerDemo
|
|
|
726c2f |
echo ./run.sh samples.LinkChecker xml/xhtml/xhtml-basic.xml
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo BeanDemo
|
|
|
726c2f |
echo ./run.sh samples.bean.BeanDemo xml/bean/gui.xml
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo SAXValidatorDemo
|
|
|
726c2f |
echo ./run.sh samples.validate.SAXValidatorDemo xml/nitf/invalid.xml
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo VisitorDemo
|
|
|
726c2f |
echo ./run.sh -Dorg.dom4j.factory=org.dom4j.datatype.DatatypeDocumentFactory samples.VisitorDemo xml/schema/personal-schema.xml
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo JTableDemo
|
|
|
726c2f |
echo ./run.sh samples.swing.JTableDemo xml/web.xml
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo JTableTool
|
|
|
726c2f |
echo ./run.sh samples.swing.JTableTool xml/swing/tableForAtoms.xml xml/periodic_table.xml
|
|
|
726c2f |
echo
|
|
|
726c2f |
echo JTreeDemo
|
|
|
726c2f |
echo ./run.sh samples.swing.JTreeDemo xml/web.xml
|
|
|
726c2f |
exit 0
|
|
|
726c2f |
fi
|
|
|
726c2f |
|
|
|
726c2f |
if [ -z "$JAVA_HOME" ] ; then
|
|
|
726c2f |
JAVA=`which java`
|
|
|
726c2f |
if [ -z "$JAVA" ] ; then
|
|
|
726c2f |
echo "Cannot find JAVA. Please set your PATH."
|
|
|
726c2f |
exit 1
|
|
|
726c2f |
fi
|
|
|
726c2f |
JAVA_BIN=`dirname $JAVA`
|
|
|
726c2f |
JAVA_HOME=$JAVA_BIN/..
|
|
|
726c2f |
fi
|
|
|
726c2f |
|
|
|
726c2f |
JAVA=$JAVA_HOME/bin/java
|
|
|
726c2f |
|
|
|
726c2f |
CLASSPATH=`build-classpath \
|
|
|
726c2f |
dom4j \
|
|
|
726c2f |
xpp2 \
|
|
|
726c2f |
jtidy \
|
|
|
726c2f |
fop \
|
|
|
726c2f |
xerces-j2 \
|
|
|
726c2f |
msv-relaxngDatatype \
|
|
|
726c2f |
msv-xsdlib \
|
|
|
726c2f |
msv-isorelax \
|
|
|
726c2f |
msv \
|
|
|
726c2f |
jaxen \
|
|
|
726c2f |
junit \
|
|
|
726c2f |
junitperf \
|
|
|
726c2f |
saxpath \
|
|
|
726c2f |
xalan-j2 \
|
|
|
726c2f |
xml-commons-apis \
|
|
|
726c2f |
avalon-framework \
|
|
|
726c2f |
avalon-logkit \
|
|
|
726c2f |
`:$CLASSPATH
|
|
|
726c2f |
|
|
|
726c2f |
BOOTCLASSPATH=`build-classpath \
|
|
|
726c2f |
xml-commons-apis \
|
|
|
726c2f |
xerces-j2 \
|
|
|
726c2f |
xalan-j2 \
|
|
|
726c2f |
`
|
|
|
726c2f |
|
|
|
726c2f |
CLASSPATH=classes:$CLASSPATH:$JAVA_HOME/lib/tools.jar
|
|
|
726c2f |
|
|
|
726c2f |
|
|
|
726c2f |
$JAVA -Xbootclasspath/p:$BOOTCLASSPATH -classpath $CLASSPATH "$@"
|