[xmlroff] Feedback on using testing module with other XSL processors?

Tony Graham Tony.Graham at MenteithConsulting.com
Wed Jul 25 10:40:26 UTC 2007


While I have closed #16, I could do with feedback on the fit (or
otherwise) of the characters used for the format strings (and on 'format
string' and other terms, too).

The additions to the README are below.

It would be preferable if you could comment on the ticket so it's easy
to find your comments later, but comments here are okay too.

------------------------------------------------------------
Using 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 test 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 test using the Antenna House XSL Formatter
on Linux:

   ./configure --with-xsl-processor=/usr/XSLFormatterV41/run.sh \
      --with-command-patterns="%p -o %o -d %i"
------------------------------------------------------------

Regards,


Tony.

#16 http://xmlroff.org/ticket/16


More information about the xmlroff-list mailing list