Bug#465894: command line invocations text in README.Debian out of date / cmdline invocation helpers

Stefano Zacchiroli zack at debian.org
Fri Feb 15 14:17:44 UTC 2008

Package: libsaxonb-java
Version: 9.0-2
Severity: minor
Tags: patch

The text describing how to invoke SaxonB from the command line available
in README.Debian seems out of date to me wrt the official documentation
[1][2].  Additionally, it only explains how to invoke the XSLT 2.0
processor and does not explain how to invoke the XQuery 1.0 processor
(which is the main reason why I'm interested in SaxonB).

The attached README.Debian fixes the issue bringing the text up to date
and also describing how to use XQuery. It also includes the
README.Debian part I've attached to bug #465885 [3], feel free to strip
it out if you don't like that part of my text.

Finally, the README.Debian text I'm attaching describes two command line
helpers, namely "saxonb-xslt" and "saxonb-xquery", which I propose for
inclusion in libsaxonb-java. The rationale is that ATM SaxonB is the
only XSLT 2.0 / XQuery 1.0 processor we have in Debian, as such I think
a lot of people will be interested in installing the package and using
it from the command line, possibly not knowing anything about Java. The
two helpers I propose let people play around with XSLT 2.0 and XQuery
not even having the need of knowing what CLASSPATH is. The
implementation is trivial (2-liner shell scripts) and is attached as

I hope you will include them as /usr/bin/ executables, but if you don't
want to please consider at least shipping them under
/usr/share/doc/contrib/ or something.


[1] http://www.saxonica.com/documentation/using-xquery/commandline.html
[2] http://www.saxonica.com/documentation/using-xsl/commandline.html
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=465885

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libsaxonb-java depends on:
ii  gij [java2-runtime]         4:4.3-1      The GNU Java bytecode interpreter
ii  gij-4.1 [java2-runtime]     4.1.2-19     The GNU Java bytecode interpreter
ii  java-gcj-compat [java2-runt 1.0.77-4     Java runtime environment using GIJ
ii  libdom4j-java               1.6.1+dfsg-2 flexible XML framework for Java
ii  libjdom1-java               1.0-4        lightweight and fast library using
ii  libxom-java                 1.1-2        A new XML object model for Java
ii  sun-java6-jre [java2-runtim 6-04-2       Sun Java(TM) Runtime Environment (

libsaxonb-java recommends no packages.

-- no debconf information
-------------- next part --------------
Command line XSLT 2.0 and XQuery 1.0 processing

To invoke the XSLT 2.0 processor from the command line you can execute the
following command:

  CLASSPATH=/usr/share/java/saxonb.jar \
  java net.sf.saxon.Transform -s:input.xml -xsl:style.xsl -o:output.xml

similarly, XQuery 1.0 processing can be invoked with:

  CLASSPATH=/usr/share/java/saxonb.jar \
  java net.sf.saxon.Query query.xq

In both cases, try -help to see other available options and see the command
line reference manual available in the libsaxonb-java-doc package.

Debian-specific helpers are provided to ease the invocations:

  saxonb-xslt [OPTIONS ...]
  saxonb-xquery [OPTIONS ...]

the former will invoke the XSLT 2.0 processor passing it all given options, the
latter will do the same for the XQuery 1.0 processor.

 -- Stefano Zacchiroli <zack at debian.org>  Fri, 15 Feb 2008 15:04:41 +0100

Calls on external Java functions disabled by default

By default, the XSLT 2.0 processor of SaxonB enables calls on external Java
functions to be embedded in stylesheets. Such calls can invoke arbitrary Java
methods and are thus a security risk when executing untrusted XSLT stylesheets.
For this reason, SaxonB in Debian comes with calls on external Java functions
disabled by default.

If you are using the command line interface of the XSLT 2.0 processor of Saxon,
you can enable this feature by passing the "-ext:on" flag to your command line
invocation. For example:

  CLASSPATH=/usr/share/java/saxonb.jar \
  java net.sf.saxon.Transform -ext:on -s:input.xml -xsl:style.xsl -o:output.xml

If you are using SaxonB from its Java API you should set the Attribute
"FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS" to "true". See the API reference in the
libsaxonb-java-doc package for more information.

 -- Stefano Zacchiroli <zack at debian.org>  Fri, 15 Feb 2008 14:47:43 +0100
-------------- next part --------------
A non-text attachment was scrubbed...
Name: saxonb-xslt
Type: application/x-shellscript
Size: 82 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20080215/c27f31aa/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: saxonb-xquery
Type: application/x-shellscript
Size: 78 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20080215/c27f31aa/attachment-0001.bin 

More information about the pkg-java-maintainers mailing list