run-onvdl
#!/bin/sh
# onvdl seems to report an "unfinished element" every
# time a required child element from another namespace occurs
# in the instance. In our case, this happens every time there
# is an <egXML> child of <exemplum>. Since the error message is
# non-specific (doesn't tell us that <exemplum> is the
# unfinished element or that one of <eg> or <egXML> would be
# required to make it finished) we end up throwing out all such
# messages via the grep -v command so we're not annoyed by the
# over 800 that are not really problems.
which onvdl || exit 1
onvdl $1 $2 | grep -v ": error: unfinished element .exemplum" \
| grep -v "unknown element .egXML" \
| sed 's/error: unfinished element/warning: unfinished element/' > $$.nvdl.log
grep error $$.nvdl.log
if [ $? -eq 0 ]
then
cat $$.nvdl.log
rm $$.nvdl.log
echo Error: nvdl run found problems
exit 1
else
cat $$.nvdl.log
rm $$.nvdl.log
exit 0
fi