The error information is written by default to System.err. You should either

(a) make sure your application is displaying or logging the information sent to System.err, or

(b) send the information somewhere else.

There are two ways of doing (b). The simplest is


The other is to write your own ErrorListener, perhaps by subclassing the standard one.

Incidentally, if a stylesheet compiles in one location and not in another, then there's a good chance it's something to do with resolving relative URIs in include/import. Either that, or it could be a Saxon license key issue.

Michael Kay

On 15/03/2013 15:12, Andrea Carlini wrote:

I'm testing a series of stylesheets created by an external application where they works fine.

When compiling them using s9api XsltCompiler I got errors, but the only message it throws is :

net.sf.saxon.s9api.SaxonApiException: Failed to compile stylesheet. 1 error detected.

The code as follows

Processor proc = new Processor(true);
XsltCompiler comp = proc.newXsltCompiler();
XsltExecutable exp = comp.compile(new StreamSource(new File(xslFile)));

How can I retrieve additional error information from the compiler ?

Thanks in advance,
Best Regards

Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:

saxon-help mailing list archived at