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 6239399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:23:08+00:00 2026-05-24T11:23:08+00:00

I need to transform one XML document into another using XSLT (for now from

  • 0

I need to transform one XML document into another using XSLT (for now from command line). I have to use Java 1.4.2. Based on that someone recommended using Saxon and provided the XSLT. It seems simple it should work, but I am lost.
I come more form a .NET environment, and have worked with XML and XSLT but not with Saxon and I am not that strong in Java.

Let me start by explaining what my problem is and what I have tried so far:
The Error:

C:\Projects\new_saxon_download>java net.sf.saxon.Transform -s:source.xml -xsl:style.xsl -o:output.xml
Exception in thread "main" java.lang.NoClassDefFoundError: org/xml/sax/ext/DefaultHandler2

        at net.sf.saxon.Configuration.(Configuration.java:2047)
        at net.sf.saxon.Transform.setFactoryConfiguration(Transform.java:81)
        at net.sf.saxon.Transform.doTransform(Transform.java:133)
        at net.sf.saxon.Transform.main(Transform.java:66)

Steps that led me here:

  1. I downloaded Saxon-B by following a link from this page
  2. I also found some information on a dependency about SAX2 from this
    page and thus obtained that as well.
  3. Set the CLASSPATH in my session:

    set CLASSPATH=.;C:\Projects\new_saxon_download\saxon9.jar;C:\Projects\new_saxon_download\sax2r2.jar
  4. Tried the transformation:

    java net.sf.saxon.Transform -s:source.xml -xsl:style.xsl -o:output.xml

Then I get the error shown above. I have tried multiple google search, but nothing has helped.

Any advice or solution would be very helpful.

  • 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-05-24T11:23:10+00:00Added an answer on May 24, 2026 at 11:23 am

    GOT IT – the description on how to fix the dependendcy issue is crap (sorry).

    This file sax2r2.jar isn’t the one you have to add to the classpath. It contains another jar (sax.jar) and that’s the library you actually need. Just extract the sax2r2.jar and put sax.jar on the classpath, then it should work.


    Give this a try: apache xml-commons includes xml-api.jar. I can’t tell if this is usable with java 1.4.12 but it’s worth a try.

    Binary releases can be found here. Download one of the xml-commons-external archives, extract xml-api.jar and add that to your classpath.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using XSLT to transform from one format of XML into another but I
I need to transform one document formated in xml into JSON and vice versa.
I'm using javax.xml.transform.Transformer.transform() to convert one xml to another through an xsl stylesheet. I
I have a need to populate a Word 2007 document from code, including repeating
I have two XML files to render one page in XSLT. This is because
I need to transform an Oracle SQL statement into a Stored Procedure therefore users
I need to serialize/de-serialize some objects into/from string and transfer them as just opaque
I have several xml files, the names of which are stored in another xml
I'm trying to transform a table to an XML struture and I want one
I am trying to produce a nested XML document from a flat XML document

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.