Updates to pz:authentication documentation
[pazpar2-moved-to-github.git] / etc / xsl / test_xsl.sh
index cd1a6ba..ec3dce9 100755 (executable)
@@ -1,4 +1,9 @@
 #!/bin/sh
+v=`xsltproc --version|head -1|awk '{print $5}'`
+if test $v -lt 10124; then
+    echo "libxslt is version $v. Skipping test"
+    exit 0
+fi
 res=0
 for x in *.xsl; do
     t=`basename $x .xsl`
@@ -8,10 +13,11 @@ for x in *.xsl; do
     echo "$t"
     for m in ${t}?.xml; do
        b=`basename $m .xml`
+       opt=`grep 'xsltproc:' $m|cut -d: -f2|cut -d- -f1|tr '#' '-'`
        l=$b.log.xml
        r=$b.res.xml
        d=$b.dif
-       xsltproc $x $m >$l
+       xsltproc $opt $x $m >$l
        if test -f $r; then
            if diff $l $r >$d; then
                rm $d