Skip to main content

Using an Alternative Version of Saxon

Zen reports comes installed ready to use the Saxon9he JAR file for XSLT 2.0 support. If you wish to use another Saxon JAR, file, such as a commercial version of Saxon 9, then you can follow these steps to configure this other Saxon JAR file for use with ZEN Reports.

  1. Install the Saxon 9 or later parser.

  2. If you are using RenderX XEP to produce PDF output, find the saxon.jar file in the XEP lib directory. Rename this file so that it is no longer called saxon.jar. Otherwise, XEP automatically uses its own .jar file and becomes XSLT 1.0 compliant.

  3. Configure Zen reports with the location of the Saxon .jar file. To do this, issue the following commands from the Terminal prompt, using the actual .jar file location on the server:

     zn "%SYS"
     set ^%SYS("zenreport","saxjar")="c:\saxon9\saxon9.jar"
  4. Set the XSLTVERSION class parameter in the Zen report class to "2.0".

  5. If you are using RenderX XEP to produce PDF output, edit the xep.bat file so that it references the .jar file that you identified in step 3, rather than some other parser or version.

  6. If you are using FOP to produce PDF output, configure FOP to work with Saxon instead of Xalan as follows:

    • Copy the Saxon .jar files saxon9.jar and saxon9-dom.jar to the FOP lib directory. For example:

      copy c:\saxon9\saxon9.jar c:\fop-0.95\lib
      copy c:\saxon9\saxon9-dom.jar c:\fop-0.95\lib
    • Modify fop.bat to set JAVAOPTS to use Saxon. The revised line in fop.bat should look like the following example, but all on one line:

      set JAVAOPTS=-Denv.windir=%WINDIR%
    • Modify fop.bat to comment out Xalan and add the Saxon .jar files to the classpath. For example:


To return from using XSLT 2.0 back to using XSLT 1.0, you can reconfigure FOP or XEP to use an older .jar file from Saxon, for example saxon65.jar instead of saxon9.jar.

FeedbackOpens in a new tab