Installation on Windows - xspec/xspec GitHub Wiki
Requirements
Make sure requirements are complete.
Installation
For this installation the Saxon JAR (e.g. saxon-he-10.9.jar
) is assumed to be in C:\saxon
.
-
Extract the source code archive file of the latest
master
branch, or alternatively clone themaster
branch of XSpec from GitHub:git clone https://github.com/xspec/xspec.git
For this installation XSpec is assumed to be extracted or cloned to
C:\xspec
. -
Open a command prompt and set up the Saxon environment variable. You can either set
SAXON_CP
to the full classpath containing the Saxon jar file:set SAXON_CP=C:\saxon\saxon-he-10.9.jar
or, alternatively, set
SAXON_HOME
to the location of the Saxon jar file:set SAXON_HOME=C:\saxon
Do not use quotation marks around the path in either variable, even if the directory path includes spaces, such as
C:\Program Files\Saxon\
.You can check that the environment variable is set with:
set SAXON_
C:\>set SAXON_ SAXON_CP=C:\saxon\saxon-he-10.9.jar
SAXON_CP
has precedence overSAXON_HOME
.If you want to make the change permanent, set the environment variable in System Control Panel (or
setx
command). -
Test the batch script with this command:
C:\xspec\bin\xspec.bat -h
The output should be the following usage summary:
Usage: xspec [-t|-q|-s|-c|-j|-catalog file|-h] file file the XSpec document -t test an XSLT stylesheet (the default) -q test an XQuery module (mutually exclusive with -t and -s) -s test a Schematron schema (mutually exclusive with -t and -q) -c output test coverage report (XSLT only) -j output JUnit report -catalog file use XML Catalog file to locate resources -e treat failed tests as error -h display this help message
Congratulations! You have successfully installed XSpec!
To make the XSpec script more portable and invoke it from anywhere, add C:\xspec\bin
to your system path. To move xspec.bat
out of the XSpec installation directory, you must set the environment variable XSPEC_HOME
to the location where XSpec is stored.