Xalan relies on Xerces -- or another JAXP-compliant parser -- to parse the input file. If that parser attempts to recover, we recover; if it doesn't, we don't.
Very few will. An ill-formed XML file is simply Not An XML File. I'd suggest you try to get whoever's running your server to rewrite their HTML error page as XHTML, which would parse successfully.
