Use $prefix in the path for stylesheets
[xmldoc.git] / xml2latex.in
diff --git a/xml2latex.in b/xml2latex.in
new file mode 100755 (executable)
index 0000000..8985fa8
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+XSLDIR=@prefix@/xslt
+
+
+stylesheet=$XSLDIR/latex.xsl
+inputs=
+
+while [ $# -gt 0 ]
+do
+   case $1 in
+   -s)
+      stylesheet=$2
+      shift
+   ;;
+
+   -*)
+      echo Usage: $0 [-s stylesheet] file...
+      exit 1
+   ;;
+
+   *)
+      inputs=`echo $inputs $1`
+   ;;
+
+   esac
+   shift
+done
+#TMPFILE=`mktemp /tmp/xmldoc.XXXXXX`
+#xp $XSLDIR/preprocess.xsl $inputs >$TMPFILE
+xp --latex $stylesheet $inputs