This file looks large and may slow your browser down if we attempt
to syntax highlight it, so we are showing it without any
pretty colors.
Highlight
it anyway.
| 1 |
#! /bin/sh |
| 2 |
|
| 3 |
# This test script validates all *.html files as XHTML. |
| 4 |
|
| 5 |
set -eu |
| 6 |
e=0 |
| 7 |
fail= |
| 8 |
IFS=$(printf '\n\t') |
| 9 |
|
| 10 |
# ditto for XHTML 1.1 (asciidoc generates that) |
| 11 |
cat - <<'_EOF' | xmllint 2>/dev/null --nonet --postvalid --noout - || exit 77 |
| 12 |
<?xml version="1.0" encoding="US-ASCII"?> |
| 13 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 14 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
| 15 |
<head><title /></head><body><p></p></body></html> |
| 16 |
_EOF |
| 17 |
|
| 18 |
for i in "${srcdir}"/*.html ; do |
| 19 |
case "$i" in |
| 20 |
*/Mailbox-Names-UTF7.html) ;; |
| 21 |
*) continue ;; |
| 22 |
esac |
| 23 |
xmllint --postvalid --noout "$i" || { e=1 ; fail="$i${fail:+" "}$fail" ; } |
| 24 |
done |
| 25 |
if [ $e != 0 ] ; then |
| 26 |
echo >&2 ">>>>> Invalid XHTML in files: ${fail}." |
| 27 |
fi |
| 28 |
exit $e |