3 # This test script validates all *.html files as XHTML.
10 # smoke test validator for XHTML 1.0 Transitional, and skip if it fails
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.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
14 <html xmlns="http://www.w3.org/1999/xhtml">
15 <head><title /></head><body></body></html>
17 # ditto for XHTML 1.1 (asciidoc generates that)
18 cat - <<'_EOF' | xmllint 2>/dev/null --nonet --postvalid --noout - || exit 77
19 <?xml version="1.0" encoding="US-ASCII"?>
20 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
21 <html xmlns="http://www.w3.org/1999/xhtml">
22 <head><title /></head><body><p></p></body></html>
25 for i in "${srcdir}"/*.html ; do
27 */fetchmail-man.html) continue ;;
28 # */Mailbox-Names-UTF7.html) continue ;;
30 xmllint --postvalid --noout "$i" || { e=1 ; fail="$i${fail:+" "}$fail" ; }
33 echo >&2 ">>>>> Invalid XHTML in files: ${fail}."