Use $prefix in the path for stylesheets
[xmldoc.git] / xml2text.in
diff --git a/xml2text.in b/xml2text.in
new file mode 100755 (executable)
index 0000000..39af60a
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+XSLDIR=@prefix@/xslt
+
+stylesheet=$XSLDIR/text.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 $stylesheet $inputs