# Two-pass structure/lexical validation and value validation.
# Usage: sh twopass.sh  xsd-schema xsl-stylesheet xml-instance
echo :: Validating $3 with $1 and $2
echo :: Pass 1 XSD structure/lexical validation...
sh ../utility/w3cschema.sh $1 $3 2>&1 >twopass.txt
if [ $? -eq 0 ]
then echo :: No structure/lexical validation errors.
else cat twopass.txt; exit 1
fi
echo :: Pass 2 XSL value validation...
sh ../utility/xslt.sh $3 $2 /dev/null 2>twopass.txt
if [ $? -eq 0 ]
then echo :: No value validation errors
else cat twopass.txt; exit 1
fi