Using Xalan 2.5.0 I gave my TransformerFactory an ErrorListener.
Which works perfectly well... unless the error occurs in a file
brought in by document(). In which case the Xalan logs the error to
stderr and continues on as best it can - leaving no record of
the error
in the ErrorListener.
Am I missing something? What can I do to catch the errors?
Presumably this was an error detected and reported by the XML parser and not
by Xalan. If you want control over error handling by the XML parser you will
need to write a URIResolver that intercepts the call on document(), and
wraps the URI into a SAXSource along with an XMLReader configured with your
own SAX ErrorHandler.
Michael Kay