daps icon indicating copy to clipboard operation
daps copied to clipboard

Support Saxon10/11/12

Open tomschr opened this issue 2 years ago • 1 comments

Problem description

DAPS currently have the option --xsltprocessor=PROCESSOR to support different XSLT processors. However, Saxon 10, 11, or 12 is not supported.

Expected behavior

Saxon 10-12 supports XSLT 3.0 which might be helpful for us in the future. It's not yet decided, but to test it and make it possible, it would be nice to provide a means to support it.

Perhaps we need to add it to the daps/libexec/daps-xslt script. The saxon{10,11,12} consists of actually two packages: the saxonX package with the JAR files and saxonX-scripts with the command line saxonX and some manpages.

In its simplest form, you call Saxon like this:

saxon10 -xi -xsl:/my/stylesheet.xsl -s:xml/MAIN.xml -o:OUTPUT

The options mean:

  • -xi Apply XInclude processing to all source XML documents
  • -xsl: Specifies the file containing the principal stylesheet module.
  • -s: Identifies the source file or directory.
  • -o: Send output to named file.

You can set more options (see below). If I'm not mistaken, it is very similar to saxon6 CLI.

Action items

To support this feature in daps, we need:

  • [ ] Adapt the configure mechanism to find the respective saxon version (10 or 11. Maybe even 12 in the near future).
  • [ ] Adapt the daps/libexec/daps-xslt script to use the respective saxon script.
  • [ ] Extend option --xsltprocessor to allow more than xsltproc and saxon. The value saxon should mean: "Use any appropriate saxon version, prefer the most recent". However, the Saxon packages allow to install all of them. In that case we should allow a more specific Saxon version. Allow saxon9, saxon10, and saxon11.
  • [ ] Adapt the daps manpage.
  • [ ] Add possible configuration for Saxon (perhaps as etc/saxon{10,11,12}.conf)

Update

Saxon9 is not supported and probably shouldn't be. Version 9 supports XSLT 2.0 only, but the latest DocBook stylesheets (xslTNG) supports only XSLT 3.0.

See also

  • https://www.saxonica.com/documentation11/index.html#!using-xsl/commandline
  • openSUSE/daps#94

tomschr avatar Dec 15 '22 21:12 tomschr

Also see #94 and #237

fsundermeyer avatar Nov 06 '23 11:11 fsundermeyer