You can supply your own ErrorListener, perhaps written as a subclass of StandardErrorListener, with an override for its warning() method.
 
Alternatively, for this particular error condition, you could supply your own URIResolver, perhaps as a subclass of the StandardURIResolver, which doesn't throw an exception when the requested file doesn't exist.
 
You can also set -warnings:silent from the command line (or the equivalent via the Configuration API) to suppress all messages relating to errors that the XSLT spec defines as "recoverable errors". However, this is a rather blunt instrument, and might well mask mistakes in your coding that you would be better off knowing about.
 
Michael Kay
http://www.saxonica.com/


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of martin.me.roberts@bt.com
Sent: 18 July 2008 15:21
To: saxon-help@lists.sourceforge.net
Subject: [saxon] Suppressing warnings from java

Hi,
  I am getting:

Recoverable error on line 110 of xsd2cam.xsl:

FODC0002: Exception thrown by URIResolver: File bundleentry://599/xsl/xsd2cam/xsd2cam.xsl not found

How can I suppress this? 

Martin