-
Notifications
You must be signed in to change notification settings - Fork 19
slaxproc
The slaxproc
command line utility can be used to invoke SLAX
scripts, check SLAX syntax, and convert between SLAX and XSLT
formats. slaxproc
can also reformat SLAX scripts into a standard
format.
slaxproc
using options to control which mode of operation is used.
The modes are exclusive.
- --check OR -c: check syntax and content for a SLAX script
- --format OR -F: format (pretty print) a SLAX script
- --run OR -r: run a SLAX script (the default mode)
- --slax-to-xslt OR -x: turn SLAX into XSLT
- --xslt-to-slax OR -s: turn XSLT into SLAX
Read more in the docs.
- --debug OR -d: enable the SLAX/XSLT debugger
- --empty OR -E: give an empty document for input
- --exslt OR -e: enable the EXSLT library
- --help OR -h: display this help message
- --html OR -H: Parse input data as HTML
- --ignore-arguments: Do not process any further arguments
- --include <dir> OR -I <dir>: search directory for includes/imports
- --indent OR -g: indent output ala output-method/indent
- --input <file> OR -i <file>: take input from the given file
- --lib <dir> OR -L <dir>: search directory for extension libraries
- --name <file> OR -n <file>: read the script from the given file
- --no-randomize: do not initialize the random number generator
- --output <file> OR -o <file>: make output into the given file
- --param <name> <value> OR -a <name> <value>: pass parameters
- --partial OR -p: allow partial SLAX input to --slax-to-xslt
- --slax-output OR -S: Write the result using SLAX-style XML (braces, etc)
- --trace <file> OR -t <file>: write trace data to a file
- --verbose OR -v: enable debugging output (slaxLog())
- --version OR -V: show version information (and exit)
- --write-version <version> OR -w <version>: write in version
Read more in the docs.
The following command line invokes the script myscript.slax
on
the input file myinput.xml
:
slaxproc myscript.slax myinput.xml
The following command line performs identically:
slaxproc -s myscript.xml -i myinput.xml
The order of the arguments does not matter:
slaxproc -i myinput.xml -s myscript.xml
Add the -g
option to make "great looking output" by turning on the
indent flag in the output-method
statement:
slaxproc -g myscript.slax myinput.xml
Use the "-E" option to give the script an empty input document:
slaxproc -E myscript.slax
To reformat a SLAX script, use the -F
flag:
slaxproc -F myscript.slax
To convert a SLAX script to XSLT, use the "-x" flag:
slaxproc -x myscript.slax formatted.slax