requirements - xspec/xspec GitHub Wiki
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 |
XSpec requires a Java Runtime Environment with a minimum version of 17.
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 being actively maintained, but the vendor recommends version 12 as "the most stable and reliable release for production use" (link).
Ant is required if launching tests with Ant.
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).
Additional requirements for specific combinations are listed below:
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.zipas XML Calabash 3 and unzip it - From the extra directory of this archive, copy the individual
*.jarfiles directly into the corresponding extra subdirectory of your XML Calabash 3 installation
The XQS processor is part of the XSpec package.
- (XSpec v3.3 or later) XProc 3:
- This requires the XML Calabash 3 BaseX extension
- Follow the instructions in XQuery with BaseX Processor above to install it
- (XSpec v3.4 or later)
xspec.batorxspec.shscript:- Install BaseX locally.
- Set the
BASEX_JARenvironment variable to the path to your installedBaseX.jarfile 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.classpathAnt property to the path to your installedBaseX.jar.
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