> -----Original Message----- > From: Finn Bock [mailto:[EMAIL PROTECTED] >
Hi Finn, Not sure if this is what you're looking for, but the javax.xml.transform.Transformer class does offer a setErrorListener() method to use a custom Error Handler... IIUC, all we have yet to do is provide an implementation for a javax.xml.transform.ErrorListener and use it to route the error messages to our common-logging (instead of the org.apache.xml.utils.DefaultErrorHandler routing them to stderr or a supplied PrintStream or PrintWriter). > I'm no expert on java's xml & transformer APIs so I need a little help. > It appears to me that when using the identity Transformer from xalan we > no longer get notifications of XML parse errors. > > Using an obviously corrupt input fo: > > <?xml version="1.0" encoding="UTF-8"?> > <xfo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> > </xfo:root> > > we get the a message on stderr from xerces DefaultErrorHandler: > > [Fatal Error] t.fo:2:56: The prefix "xfo" for element "xfo:root" is not > bound. > > and there is no way AFAICT to set a different error handler on the > XMLReader that the xalans transformer creates and uses to parse the > input file. > > Am I missing something? > > regards, > finn > HTH, Andreas