source: gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes/GS-XSLT-INTERFACE.sh@ 37120

Last change on this file since 37120 was 37109, checked in by davidb, 16 months ago

Bash script to make it easier to run an XML + XSL pairing of files geneated when GS3 produces a runtime error in applying an XSLT

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/bash
2
3if [ "x$GSDL3HOME" = "x" ] ; then
4 source ./SETUP.bash
5fi
6
7
8#java -cp web/WEB-INF/lib/gsdl3.jar:web/WEB-INF/lib/log4j-1.2.8.jar:web/WEB-INF/lib/gutil.jar org.greenstone.gsdl3.util.XSLTUtil \
9# "$@"
10
11source_xml_filename="$1"
12stylesheet_xslt_filename="$2"
13
14if [ "x${source_xml_filename%%/*}" != "x" ] ; then
15 source_xml_filename="${GSDL3HOME}/logs/tmp/$source_xml_filename"
16fi
17
18if [ "x${stylesheet_xslt_filename%%/*}" != "x" ] ; then
19 stylesheet_xslt_filename="${GSDL3HOME}/logs/tmp/$stylesheet_xslt_filename"
20fi
21
22
23if [ ! -d tmp ] ; then
24 mkdir tmp
25fi
26
27#Look for stylesheet in: /mnt/disks/atea-scratch-encrypted/davidb/research/code-managed/intermuse/greenstone3-svn/web/logs/tmp/stylesheet79.xml
28#Look for source XML in: /mnt/disks/atea-scratch-encrypted/davidb/research/code-managed/intermuse/greenstone3-svn/web/logs/tmp/source79.xml
29
30echo ""
31echo "Applying XSL Transform:"
32echo ""
33echo " java"
34echo " org.apache.xalan.xslt.Process \\"
35echo " -IN $source_xml_filename \\"
36echo " -XSL $stylesheet_xslt_filename"
37
38java \
39 -cp web/WEB-INF/lib/xalan.jar:web/WEB-INF/lib/serializer.jar:web/WEB-INF/lib/xml-apis.jar:web/WEB-INF/lib/xercesImpl.jar \
40 -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl \
41 org.apache.xalan.xslt.Process -IN "$source_xml_filename" -XSL "$stylesheet_xslt_filename" -OUT "tmp/gs-xslt-interface--$$.out"
42
43echo ""
44echo "Saved XSL Transform output to:"
45echo " tmp/gs-xslt-interface--$$.out"
46
47
48
Note: See TracBrowser for help on using the repository browser.