Testing an Alternative XSL Processor
You can test XSL processors other than xmlroff by specifying the --with-command-patterns parameter to 'configure'.
The value of --with-command-patterns is a list of one or more command patterns, separated by semicolons.
A command pattern is the format of the command to run the XSL processor, but with format strings, e.g., '%p', at the points in the command where the testing system substitutes values.
The format strings are:
- %p
- XSL processor
Specified by --with-xsl-processor.
- %c
- XSL processor flags
Specified by --with-xsl-processor-flags.
When --with-xsl-processor-flags is not specified, this format string is not substituted.
- %i
- Input XML file
Taken from the test definition, and potentially different for every test.
- %s
- Stylesheet file
Either taken from the test definition or, when not specified in the test definition and --with-default-stylesheet is specified, the default stylesheet.
When neither a per-test stylesheet nor a default stylesheet is specified, this format string is not substituted.
- %o
- Output file
The filename is determined by the testing module and is (or should be) different for each test.
- %%
- Literal '%'
If a command pattern contains unsubstituted format strings, e.g., if the pattern contains '%c' but --with-xsl-processor-flags is unspecified, then the command pattern is disregarded and the next pattern is evaluated.
If none of the command patterns are completely substituted, then things will probably not work.
For example, the default command patterns value is:
%p -o %o %c %i %s;%p -o %o %c %i;%p -o %o %i %s;%p -o %o %i
The first pattern is disregarded when either %c or %s is unevaluated; the second, when %c is unevaluated; the third, when %s is unevaluated; and the fourth will always be evaluated since it contains no optional format strings.
This example shows how to configure to test using the Antenna House Formatter on Linux:
./configure --with-xsl-processor=/usr/AHFormatterV53/run.sh \ --with-command-patterns="%p -o %o -d %i"
This example shows how to configure to test using FOP on Linux:
./configure --with-xsl-processor=fop \ --with-command-patterns="%p -r -xml %i -xsl %s -pdf %o;%p -r -fo %i -pdf %o"
