requirements - xspec/xspec GitHub Wiki

General

Testing with XSpec has 3 parts, which are:

  • the type of code to be tested (XSLT, XQuery, Schematron, XProc)
  • the processor used to execute the test code (Saxon, BaseX, SchXslt2, XQS, XML Calabash 3)
  • the tool used to launch the test (Command scripts xspec.bat/xspec.sh, Ant, XML Calabash3)

The allowed combinations are shown in the following table:

Test Processor Cmd Script Ant XML Calabash 3
XLST Saxon Yes Yes Yes
XQuery Saxon Yes Yes Yes
XQuery BaseX No No Yes
Schematron SchXslt2 Yes Yes No
Schematron XQS Yes Yes Yes
XProc XML Calabash3 Yes Yes Yes

Common Requirements

Java

XSpec requires a Java Runtime Environment with a minimum version of 17.

Saxon

XSpec requires the Saxon processor running on Java.

Note: if running tests with XML Calabash 3 Saxon doesn't need to be installed separately because there is a version of Saxon included within the XML Calabash 3 package.

Saxon can be downloaded from:

  • Saxon HE (open source)
  • Saxon PE/EE (commercial products) XSpec is tested on Saxon 12 and 11. Only Saxon 12 is recommended, however.

Saxon 11 is deprecated

Saxon 11 is being actively maintained, but the vendor recommends version 12 as "the most stable and reliable release for production use" (link).

Ant

Ant is required if launching tests with Ant.

XML Calabash 3

XSpec requires XML Calabash 3 when testing XProc, but it can also be used to run tests for XSLT, XQuery, Schematron and XProc.

From the XML Calabash 3 release page, find the latest release, download its xmlcalabash-3.y.z.zip file for that 3.y.z release, and unzip it to a local path (e.g., /tmp/xmlcalabash3 for Linux/macOS or C:\xmlcalabash3 for Windows). Make sure you download the zip file because libraries are required (that is, using only the jar file won't work).

Specific Test / Processor Requirements

Additional requirements for specific combinations are listed below:

XQuery with BaseX Processor

This is supported only when launching with XML Calabash 3 and requires the XML Calabash 3 BaseX extension.

  • Download the same version of basex-3.y.z.zip as XML Calabash 3 and unzip it
  • From the extra directory of this archive, copy the individual *.jar files directly into the corresponding extra subdirectory of your XML Calabash 3 installation

Schematron with XQS Processor

The XQS processor is part of the XSpec package.

  • (XSpec v3.3 or later) XProc 3:
  • (XSpec v3.4 or later) xspec.bat or xspec.sh script:
    • Install BaseX locally.
    • Set the BASEX_JAR environment variable to the path to your installed BaseX.jar file before you run the script.
  • (XSpec v3.4 or later) Ant or the Run XSpec Test Oxygen transformation scenario:
    • Install BaseX locally.
    • Set the xspec.basex.classpath Ant property to the path to your installed BaseX.jar.

XSpec internal testing

XSpec is tested with:

  • Java 17 and 21, using the Eclipse Temurin distributions of OpenJDK
  • Saxon 11 and 12. Only Saxon 12 is recommended, however.
  • Ant 1.10.14
  • XML Calabash 3 and the BaseX extension: latest or near-latest released version
  • BaseX: latest released version
  • SchXslt2: latest released version
  • XQS: latest released version
⚠️ **GitHub.com Fallback** ⚠️