-
Notifications
You must be signed in to change notification settings - Fork 49
Installation on Mac and Linux
XSpec requires the Saxon XSLT and XQuery processor which can be downloaded from:
- Saxon HE (open source)
- Saxon PE/EE (commercial products)
For this installation the Saxon JAR (e.g. saxon9he.jar) is assumed to be in ~/xspec.
-
Clone the master branch of XSpec from GitHub:
git clone https://github.com/expath/xspec.git
For this installation both XSpec and Saxon are assumed to be in
~/xspec. -
Set up the Saxon environment variables. You can either set
$SAXON_HOMEto the location of the Saxon jar file:export SAXON_HOME=~/xspec/
or alternatively set
$SAXON_CPto the full classpath containing the Saxon jar file:export SAXON_CP=/path/to/saxon/saxon9he.jarYou can check that the environment variable is set with:
echo $SAXON_HOME
SAXON_CPhas precedence overSAXON_HOME.If you want to make the change permanent, set the environment variable in your shell profile (e.g.
~/.bashrcor~/.bash_profile). -
Open up a terminal, navigate to
~/xspec, make sure that the filebin/xspec.shis executable, and test the shell script with this command:bin/xspec.sh -h
The output should be the following usage summary:
Saxon script not found, invoking JVM directly instead. Usage: xspec [-t|-q|-c|-h] filename [coverage] filename the XSpec document -t test an XSLT stylesheet (the default) -q test an XQuery module (mutually exclusive with -t) -c output test coverage report -h display this help message coverage deprecated, use -c instead
Congratulations! You have successfully installed XSpec!
To make the XSpec script more portable and invoke it from anywhere, set the environment variable $XSPEC_HOME to the location where XSpec is stored and add a script invoking xspec.sh in /usr/bin.
If you have any questions about XSpec or want to discuss, contribute and share information with the XSpec community, please go to one of the following places:
Intro
Installation
Getting Started
Tools Integration
Continuous Integration
Under the hood