How to get transformation messages into a stream?

"P.N." <[email protected]> Thu, 23 Sep 2010 16:59:39 +0200
Newsgroups gmane.text.xml.xalan.java.user
Message-ID <[email protected]>
Hello!

I want to get all the usual console output from xalan (e.g. from 
<xsl:message>) into a PrintStream - how can I get this behaviour?

Kind regards

Peter