File: saxon.sh

package info (click to toggle)
docbook-defguide 2.0.17%2Bsvn9912-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 93,436 kB
  • sloc: xml: 396,482; perl: 4,471; python: 879; makefile: 150; sh: 80
file content (42 lines) | stat: -rw-r--r-- 1,275 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
#
# Written for the Debian distribution by Daniel Leidert, 2007.
# Released under GPL v2.
#
# This is a small and custom script so we don't need upstreams build
# environment. Further this shall help to decrease the number of changes we
# need to make to upstreams build process.

set -e

JAVA=${JAVA:-java}

DEFAULT_CLASSPATH="/usr/share/java/saxon.jar:/usr/share/java/docbook-xsl-saxon.jar:/usr/share/java/xml-resolver.jar:/usr/share/java/xercesImpl.jar:/etc/xml/resolver/"

CLASSPATH=${CLASSPATH:-$DEFAULT_CLASSPATH}

MY_XML=$1
shift
MY_XSL=$1
shift
MY_OUT=$1
shift

MY_OPT=$*

$JAVA -cp $CLASSPATH -Xms512M -Xmx1024M \
      -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl \
      -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl \
      com.icl.saxon.StyleSheet \
      -x org.apache.xml.resolver.tools.ResolvingXMLReader \
      -y org.apache.xml.resolver.tools.ResolvingXMLReader \
      -r org.apache.xml.resolver.tools.CatalogResolver \
      -u \
      -o $MY_OUT $MY_XML $MY_XSL $MY_OPT \
      use.extensions=1 \
      graphicsize.extension=0 \
      admon.graphics.path=figures/admon/ \
      callout.graphics.path=figures/callouts/ \
      chunker.output.indent=yes

exit 0