#!/bin/sh

XMLLINT=xmllint
TOOLSDIR=`dirname $0`
SGML_CATALOG_FILES=$TOOLSDIR/../doc/docbook/xml/4.2/catalog.xml
export SGML_CATALOG_FILES

which $XMLLINT > /dev/null
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
  echo "Error: $XMLLINT command required!"
  exit 1;
fi

$XMLLINT --noout --valid --catalogs $*
