[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-j-dev
Subject:    Re: How to suppress standard out error in Xalan
From:       Simon Kitching <simon () ecnetwork ! co ! nz>
Date:       2003-01-27 21:47:19
[Download RAW message or body]

Oops - you were asking about xalan, not xerces.

You should really ask this on the xalan list instead.
However, the answer is:
(a) create your own subclass of javax.xml.transform.ErrorListener
(b) call setErrorListener on the javax.xml.transform.Transformer before
starting the transform.

Regards,

Simon


Hi,

I can only help you with the java solution..

What you need to do to suppress error message output is:
(a) create your own subclass of org.xml.sax.ErrorHandler, which does
whatever you want with the message. 
(b) call setErrorHandler on the javax.xml.parsers.DocumentBuilder or
javax.xml.parsers.SAXParser object before starting parsing.

It is the default ErrorHandler object which is printing messages to
stderr.

Regards,

Simon


On Mon, 2003-01-27 at 05:52, Kumaravel wrote:
> Hi,
>   I am using Xalan 1.4 C++ and Java. Whenever any error occurs in the
> transformation, Xalan prints the error on console (std err). I donot
> want it
> on console. How to suppress it?
> 
> Cheers
> Kumaravel
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic