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.
Install the Saxon 9 or later parser.
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.
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"Copy code to clipboard
Set the XSLTVERSION class parameter in the Zen report class to "2.0".
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.
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\libCopy code to clipboard
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% -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImplCopy code to clipboard
Modify fop.bat to comment out Xalan and add the Saxon .jar files to the classpath. For example:
REM set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.7.0.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\saxon9.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\saxon9-dom.jarCopy code to clipboard
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.