I am using SaxonJ to perform XSLT transformation from Java.
My XSLT files have to output any debug/info as output since my transformation logic is complex.
Is there a way in which I can redirect to log4j so that I can store have the transformation information in a log file?
My system already uses log4j to log output to file. I want to append the transformation debug messages as well.
Any ideas?
I am pretty sure that you have already found out how to perform this. But I hope that my answer will be useful for other people.
All you need to do is implementing MessageListener interface: http://www.saxonica.com/documentation/javadoc/net/sf/saxon/s9api/MessageListener.html