#!/bin/bash
file="${1:--}"; shift
cat "$file" |
perl -pe 's/<\?xml\b.*?>|<!DOCTYPE.*?>//g;' |
WRAPXML=1 xhtmllint "$@"
