Need help installing Saxon

I use Skrooge to manage my finances. And in a recent update, the XML import (I get my bank statements in ISO 20022 XML) started relying on Saxon (or Saxonb). Apparently only the Saxon packages offer XSLT 2.0 support that is required.

But for the love of me, I cannot figure out how to get Saxon to work on my laptop.

I tried both:

… and in both cases, I cannot even get a working CLI command.

Help would be much appreciated :grinning_cat_with_smiling_eyes:

The one you want is saxon-he. However, it looks like the AUR package is broken. There are instructions on the AUR page for how to fix it.

Thanks, @dalto, as always, for a very fast reply.

I should have mentioned that I did try that too and am still running into issues.

Specifically what I did:

  1. install saxon-he with yay saxon-he
  2. make sure /usr/share/java/saxon/saxon.jar is a symlink to /usr/share/java/saxon/saxon-he-12.9.jar (the current JAR shipped with the package
  3. edit /usr/bin/saxon, /usr/bin/saxon-xslt and /usr/bin/saxon-xquery to use /usr/share/java/saxon/saxon.jar instead of the versioned JAR.

e.g. /usr/bin/saxon looks like this now:

#!/bin/sh

java -cp /usr/share/java/saxon/saxon.jar net.sf.saxon.Transform "$@"

…But when I run it, I get a new error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/xmlresolver/Resolver
        at net.sf.saxon.lib.CatalogResourceResolver.<init>(CatalogResourceResolver.java:46)
        at net.sf.saxon.Configuration.init(Configuration.java:387)
        at net.sf.saxon.Configuration.<init>(Configuration.java:234)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at net.sf.saxon.Configuration.newConfiguration(Configuration.java:250)
        at net.sf.saxon.s9api.Processor.<init>(Processor.java:83)
        at net.sf.saxon.Transform.doTransform(Transform.java:327)
        at net.sf.saxon.Transform.main(Transform.java:85)
Caused by: java.lang.ClassNotFoundException: org.xmlresolver.Resolver
        at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 12 more

Did you modify the PKGBUILD file as described on the AUR page to include:

install -Dm644 -t "$pkgdir/usr/share/java/saxon/lib" lib/jline-2.14.6.jar \
    lib/xmlresolver-5.2.2.jar lib/xmlresolver-5.2.2-data.jar

That part I did not do, no. I haven’t been brave enough to modify PKGBUILD files yet. Is there a easy tutorial to follow?

There a lots of ways but on way is like this:

git clone https://aur.archlinux.org/saxon-he.git
cd saxon-he

Use a text editor to add that line to the package() function. Then run makepkg -i.

Thanks, I’ll look into that and/or message the maintainer about the issue

Progress, but another failure:

==> Making package: saxon-he 12.9-1 (Fri Nov 28 23:05:19 2025)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found SaxonHE12-9J.zip
  -> Found saxon-xslt.sh
  -> Found saxon-xquery.sh
==> Validating source files with sha512sums...
    SaxonHE12-9J.zip ... Passed
    saxon-xslt.sh ... Passed
    saxon-xquery.sh ... Passed
==> Extracting sources...
  -> Extracting SaxonHE12-9J.zip with bsdtar
bsdtar: Failed to set default locale
==> Removing existing $pkgdir/ directory...
==> Entering fakeroot environment...
==> Starting package()...
install: cannot stat 'lib/xmlresolver-5.2.2.jar': No such file or directory
install: cannot stat 'lib/xmlresolver-5.2.2-data.jar': No such file or directory
==> ERROR: A failure occurred in package().
    Aborting...