Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8355159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:46:54+00:00 2026-06-09T09:46:54+00:00

I am using SaxonJ to perform XSLT transformation from Java. My XSLT files have

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T09:46:55+00:00Added an answer on June 9, 2026 at 9:46 am

    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

    public class MessageListenerImpl implements MessageListener {
        private static Logger logger = Logger.getLogger(MessageListenerImpl.class);
    
        public void message(XdmNode content, boolean terminate, SourceLocator locator) {
            if (terminate) {
                logger.error(content.getStringValue());
                System.exit(1);
            } else {
                logger.warn(content.getStringValue());
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Transformer to perform XSL transformation from XML to XHTML: import javax.xml.transform.Transformer;
I have a chained XSLT 2.0 transformation scenario (using saxon), like this: - I1.xml
I am converting a XML to HTML using XSLT. The output of should have
I'm trying to use the Saxon processor from java. I'm using the the saxon9ee.jar
I am trying to convert plain text files to XML files using XSLT. I
I'm using XSLT 2 (Saxon 9.x) with Java and having the following problem ...
I am using net.sf.saxon.TransformerFactoryImpl to do some transformation to multiple XML files. I am
I need to transform one XML document into another using XSLT (for now from
Using the <xslt> task in ant, how do I get the output to generate
I have an xslt transformation that works fine when run in Altova XML Spy,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.