# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# See LICENSE.txt included in this distribution for the specific
# language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
# A script that scans through the generated xrefs in an OpenGrok data
# directory and checks if they contain valid XHTML 1.0 data.
#
# The script should be run with one argument, which should be the path
# to the OpenGrok data directory (the parent of the xref directory).
# If no problems are found, the script will be silent. Otherwise, it
# will print which files are ill-formed and what the problems are.
#
# The script has only been tested on Debian systems with the
# libxml2-utils and w3c-sgml-lib packages installed.
#
exit 1
fi
if ! [ -f "$dtd" ]; then
echo "Cannot find $dtd."
echo "Please install w3c-sgml-lib."
exit 1
fi
echo "Cannot find the xmllint executable."
echo "Please install libxml2-utils."
exit 1
fi
cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title></head>
<body>
<div><pre>
EOF
}
cat <<EOF
</pre></div>
</body>
</html>
EOF
}
do
then
echo "*** ILL-FORMED DATA IN $i ***"
echo
echo
fi
done