Package Managers

Taps and pipes

The Packaging System specification is still under development, but three implementations have been released yet, supporting the current state of the working draft. Those implementations are for the eXist database, for the Saxon XSLT and XQuery processor and for the Calabash XProc processor. Those implementations are just prototypes that add packaging support to those processors, as external libraries. In addition, there is a standalone application to manage a repository on the disk (Saxon and Calabash use the same repository layout, while eXist uses its own method to deploy packages, based on JAR files.) Keep in mind that this module, and its implementations, can evolve (and will do) in the near future, depending on the feedback got from the community.

The current packaging specification defines a standard repository layout. Currently, this layout is supported by implementations for both Saxon and Calabash. The repository manager is thus common. It is a command line program that allows one to initialize a new repository, install packages, delete packages, list the installed packages, etc. Download the JAR file expath-pkg-repo-0.1.jar, and use the command java -jar expath-pkg-repo-0.1.jar. For more information, see this blog post. In addition to this repository manager, you need a runtime support for your processor (for now, Saxon and Calabash support the standard repository layout, eXist has its own way of deploying packages.)

The runtime support for Saxon is included in the JAR file expath-pkg-saxon-0.2.jar. In addition, the classpath must contain the JAR file for the repository management (see above.) If you use Saxon from Java, you can use the class org.expath.pkg.saxon.java.ConfigHelper. If you use Saxon from the command line, you have to use org.expath.pkg.saxon.java.EXPathTransform as the main class for XSLT 2.0, or org.expath.pkg.saxon.java.EXPathQuery for XQuery, instead of the Saxon's main classes (resp. net.sf.saxon.Transform and net.sf.saxon.Query.) You can use the following shell script to help you setting up the classpath with the extensions installed in the repository and written in Java: expath-pkg-saxon-0.2.sh. See this blog post and this blog post for more information (the first one is older and about Saxon in porticular, the second one is up-to-date and more specifically about the shell script.)

For Calabash you can use the same instructions as for Saxon above, by adding in addition the following JAR file to your classpath: expath-pkg-calabash-0.1.jar, by using org.expath.pkg.calabash.Main and the following shell script: expath-pkg-calabash-0.1.sh. See this blog post and this blog post for more information.

The package manager for eXist is provided as a single JAR file. Just download it and launch it the usual way (depending on your platform, that could be by double-clicking on it, or by executing the command java -jar expath-pkg-exist-0.1.jar.) For now, it requires a windowing system, but a text oriented interface will be provided later, to enable its usage on graphical-less environments, like servers. You can find a step-by-step presentation of this package manager in the following blog post.