Bug#206390: libxalan2-java: provide a command-line wrapper

Jeroen van Wolffelaar jeroen at wolffelaar.nl
Wed Aug 17 09:55:31 UTC 2005


On Wed, Aug 20, 2003 at 03:43:51PM +0200, Pierre THIERRY wrote:
> It would be convenient to have a command-line tool for Xalan, as
> described in /usr/share/doc/libxalan2-java-doc/commandline.html
> 
> diff -rNU 2 libxalan2-java-2.5.0.old/debian/rules libxalan2-java-2.5.0/debian/rules
> --- libxalan2-java-2.5.0.old/debian/rules       2003-08-20 14:42:01.000000000 +0200
> +++ libxalan2-java-2.5.0/debian/rules   2003-08-20 15:36:21.000000000 +0200
> @@ -41,4 +41,5 @@
>         install -m 644 bin/xml-apis.jar debian/libxalan2-java/usr/share/java/xml-apis-$(UPSTREAM_VERSION).jar
>         ln -s xml-apis-$(UPSTREAM_VERSION).jar debian/libxalan2-java/usr/share/java/xml-apis.jar
> +       install -m 755 debian/xalan.sh debian/libxalan2-java/usr/bin/xalan
> 
>         # package libxsltc-java
> diff -rNU 2 libxalan2-java-2.5.0.old/debian/xalan.sh libxalan2-java-2.5.0/debian/xalan.sh
> --- libxalan2-java-2.5.0.old/debian/xalan.sh    1970-01-01 01:00:00.000000000 +0100
> +++ libxalan2-java-2.5.0/debian/xalan.sh        2003-08-20 15:20:18.000000000 +0200
> @@ -0,0 +1,10 @@
> +#!/bin/sh
> +# Command line wrapper for running xalan.
> +# Written by Ola Lundqvist <opal at debian.org> for fop package
> +# Modified by Pierre Thierry <pierre.thierry at moine-fou.org>
> +
> +JAVASH=/usr/share/java
> +
> +export CLASSPATH=$JAVASH/xalan2.jar:$JAVASH/xerces.jar:$JAVASH/logkit.jar:$JAVASH/avalon-framework.jar:$JAVASH/jimi-1.0.jar:$CLASSPATH
> +
> +java $JAVA_OPTS org.apache.xalan.xslt.Process "$@"
> 
> This patch has one flaw: it should use alternatives to deal with the C++
> Xalan binary and the possible Java Xalan wrapper.

I addition to Stefan's remarks:
- You really should in this type of cases use 'exec java' instead of
  'java' -- if the main beef and last line of a shell script is an
  execution, exec will terminate the shell script and render into the
  executed program, thus saving memory and a process slot.
- There is no manpage (commandline.{html,xml} provides plenty of
  documentation to convert to manpage)

But as Stefan noted, and because java doesn't have -dev packages with
libraries, policy[1] is prohibiting inclusion here, and I am not sure
an extra package is warranted considering the amount of people that
would use xalan stand-alone. But I tend to agree a standalone 'xalan'
package does make sense to have.
 
--Jeroen

[1] http://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-sharedlibs-runtime-progs

-- 
Jeroen van Wolffelaar
jeroen at wolffelaar.nl
http://jeroen.A-Eskwadraat.nl




More information about the pkg-java-maintainers mailing list