Blame SOURCES/saxon.saxon.script

3fb340
#!/bin/sh
3fb340
# 
3fb340
# saxon script
3fb340
# JPackage Project <http://www.jpackage.org/>
3fb340
3fb340
. /usr/share/java-utils/java-functions
3fb340
3fb340
MAIN_CLASS=net.sf.saxon.Transform
3fb340
3fb340
BASE_JARS="saxon.jar xml-commons-apis.jar jaxp_parser_impl.jar bea-stax-api.jar bea-stax-ri.jar"
3fb340
3fb340
# Optional jars
3fb340
CLASSPATH="$CLASSPATH:"$(build-classpath docbook-xsl-saxon \
3fb340
  avalon-logkit xml-commons-resolver 2>/dev/null) || :
3fb340
3fb340
# If we have resolver, add the CatalogManager.properties dir to CLASSPATH,
3fb340
# and tweak command line options so that it's used.
3fb340
args=
3fb340
if echo "$CLASSPATH" | grep xml-commons-resolver >/dev/null 2>&1 ; then
3fb340
  CLASSPATH="$CLASSPATH:/etc/java/resolver"
3fb340
  # Tune options to use resolver.
3fb340
  r=org.apache.xml.resolver.tools.ResolvingXMLReader
3fb340
  for opt in -x -y ; do
3fb340
    if ! echo $@ | grep "\\$opt " >/dev/null 2>&1 ; then
3fb340
      args="$args $opt:$r"
3fb340
    fi
3fb340
  done
3fb340
  r=org.apache.xml.resolver.tools.CatalogResolver
3fb340
  if ! echo $@ | grep "\\-r " >/dev/null 2>&1 ; then
3fb340
    args="$args -r:$r"
3fb340
  fi
3fb340
fi
3fb340
3fb340
# Set parameters
3fb340
set_jvm
3fb340
set_classpath $BASE_JARS
3fb340
set_flags $BASE_FLAGS
3fb340
set_options $BASE_OPTIONS
3fb340
3fb340
# Let's start
3fb340
run $args "$@"