# Genericode preparation
# Usage: prepare-cva cva-instance cva-stylesheet
echo :: Validating $1.cva with context/value association document model
sh ../utility/w3cschema.sh ../utility/ContextValueAssociation.xsd $1.cva >prepare-cva.txt
if [ $? -eq 0 ]
then echo :: No XSD validation errors.
else cat prepare-cva.txt; exit 1
fi
# echo :: Preparing documentation...
# sh ../utility/xslt.sh $1.cva ../utility/Crane-assoc2html.xsl $1.html 2>prepare-cva.txt
# if [ $? -eq 0 ]
# then echo :: No documentation preparation errors
# else cat prepare-cva.txt; exit 1
# fi
echo :: Preparing Schematron pattern...
sh ../utility/xslt.sh $1.cva $2 $1.sch 2>prepare-cva.txt
if [ $? -eq 0 ]
then echo :: No Schematron pattern preparation errors
else cat prepare-cva.txt; exit 1
fi