File saxon9.saxon.script of Package saxon9 (Revision 6af51ce7f4b29b930e9faf35d4914da6)
Currently displaying revision 6af51ce7f4b29b930e9faf35d4914da6 , Show latest
42
1
#!/bin/sh
2
#
3
# saxon script
4
# JPackage Project <http://www.jpackage.org/>
5
6
. /usr/share/java-utils/java-functions
7
8
MAIN_CLASS=net.sf.saxon.Transform
9
10
BASE_JARS="saxon9.jar xml-commons-apis.jar jaxp_parser_impl.jar bea-stax-api.jar bea-stax-ri.jar"
11
12
# Optional jars
13
CLASSPATH="$CLASSPATH:"$(build-classpath docbook-xsl-saxon \
14
avalon-logkit xml-commons-resolver 2>/dev/null) || :
15
16
# If we have resolver, add the CatalogManager.properties dir to CLASSPATH,
17
# and tweak command line options so that it's used.
18
args=
19
if echo "$CLASSPATH" | grep xml-commons-resolver >/dev/null 2>&1 && test -r /etc/java/resolver/CatalogManager.properties; then
20
CLASSPATH="$CLASSPATH:/etc/java/resolver"
21
# Tune options to use resolver.
22
r=org.apache.xml.resolver.tools.ResolvingXMLReader
23
for opt in -x -y ; do
24
if ! echo $@ | grep "\\${opt}:" >/dev/null 2>&1 ; then
25
args="$args ${opt}:$r"
26
fi
27
done
28
r=org.apache.xml.resolver.tools.CatalogResolver
29
if ! echo $@ | grep "\\-r:" >/dev/null 2>&1 ; then
30
args="$args -r:$r"
31
fi
32
fi
33
34
# Set parameters
35
set_jvm
36
set_classpath $BASE_JARS
37
set_flags $BASE_FLAGS
38
set_options $BASE_OPTIONS
39
40
# Let's start
41
run $args "$@"
42