#!/bin/sh
xsd=/var/www/html/xsd19139/gmx/gmx.xsd
for xml in "$@"
do
n=`xsltproc oai2gmdcount.xsl $xml`
: echo count $n
i=1
while test $n -ge $i
do
: echo $i
id=`xsltproc --stringparam n $i oai2gmdcount.xsl $xml`
xsltproc --stringparam n $i oai2gmd.xsl $xml > zgmd.xml
if xmllint --noout --schema $xsd zgmd.xml 2> zval.out
then
: rm -f zval.out
else
echo "=== $id ==="
cat zval.out
fi
i=`expr $i + 1`
done
done