-
Notifications
You must be signed in to change notification settings - Fork 31
Installation on Mac and Linux
Make sure requirements are complete.
For this installation the Saxon JAR (e.g. saxon-he-10.9.jar
) is assumed to be in ~/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
~/xspec
. -
Set up the Saxon environment variable. You can either set
SAXON_CP
to the full classpath containing the Saxon jar file:export SAXON_CP=~/saxon/saxon-he-10.9.jar
or, alternatively, set
SAXON_HOME
to the location of the Saxon jar file:export SAXON_HOME=~/saxon
You can check that the environment variable is set with:
echo $SAXON_CP
SAXON_CP
has precedence overSAXON_HOME
.If you want to make the change permanent, set the environment variable in your shell profile (e.g.
~/.bashrc
or~/.bash_profile
). -
Open a terminal, navigate to
~/xspec
, make sure that the filebin/xspec.sh
is executable, and test the shell script with this command:bin/xspec.sh -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 a script invoking xspec.sh
in /usr/bin
. To move xspec.sh
out of the XSpec installation directory, you must set the environment variable XSPEC_HOME
to the location where XSpec is stored.
If you have any questions about XSpec or want to discuss, contribute, and share information with the XSpec community, please go to our issue tracker.
For historical searches, the Google group might also be useful.
- Writing Scenarios
- Nesting Scenarios
- Focusing Your Efforts
- Global Context Item
- Selecting Nodes
- Whitespace-only Text Nodes
- Attribute Value Templates
- Text Value Templates
- Special Names
- Code Coverage
- XML Catalog Support
- Environment Variables
- Testing Dynamic Errors
- Integrating Your Own Test Helpers
- External Transformation
- Getting Started with XSpec and Schematron
- Writing Scenarios for Schematron
- Testing Schematron with Text Nodes
- Testing Schematron with Attributes
- Using Another Implementation of Schematron