How to use Calabash Extensions for XProc

Having trouble installing Oxygen? Got a bug to report? Post it all here.
fsteimke
Posts: 80
Joined: Tue Jan 01, 2013 3:19 pm

How to use Calabash Extensions for XProc

Post by fsteimke »

Hi,
i am not sure whether this is a Common Problems or a Feature Request Topic. Anyway: I found that XProc is a great way to automate DocBook transformations Tasks. I am using the built in Calabash Engine on Linux and Windows with Oxygen 24.

Now i'd like to extend it with additional modules shown in GitHub xmlCalabash1, especially PlantUML. I was able to build the jar File, which works correct when tested within the gradle build Script. However, i failed to use it in Oxygen.

I added the fresh jar file to the $OXYGEN_HOME/lib/xproc/calabash/lib directory and in the $OXYGEN_HOME/lib/xproc/calabash/engine.xml file. But when i try to run an xproc Script with a planuml Extension, all i get is a net/sourceforge/plantuml/SourceStringReader Error Message. Maybe a conflict with different JAVA Versions or libraries?

So my Question is: is there any advice how to add xmlcalabash Extension Modules to Oxygen?

Or (much better) a feature Request: Could you please add the xml Calabash Extension Modules listed in the Modularity Section in https://github.com/ndw/xmlcalabash1 to the XProc Function in your Oxygen Release?

Thank you,
Frank
Mircea
Posts: 131
Joined: Tue Mar 25, 2003 11:21 am

Re: How to use Calabash Extensions for XProc

Post by Mircea »

Hi Frank,

What is the exact error you obtain after placing the new jar file in the Calabash's lib folder ?
There are some possible causes for this:
  1. There are some missing dependencies that are required by the PlantUML jar you created. Those jars must be added in the lib folder and in the engine.xml as you correctly did with the first one.
  2. The versions of the PlantUML and Calabash are not the same. Please note that we are using Calabash XProc 1.3.2-99
  3. The jars might be compiled against different Java versions. Our aplication is compiled with Java 8
Regards,
Mircea.
Mircea Enachescu
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
fsteimke
Posts: 80
Joined: Tue Jan 01, 2013 3:19 pm

Success, after all

Post by fsteimke »

Hi all,

it did pass the first test right now, so i think it works . This is what i did for the XML Calabash PlantUML extension step within Oxygen 24 on Linux :
  • Download the latest Release from GitHub
  • Build jar file with gradle, since the release 1.2.0 contains only Sources, although the Readme mentions a top level jar file. For this, i had to install and use a JAVA 8 jdk.
  • Copy this jar File to $OXYGEN_HOME/lib/xproc/calabash/lib folder
  • Copy the latest stable Release of plantuml.jar from GitHub, in my case plantuml-1.2021.14.jar, in the same Folder $OXYGEN_HOME/lib/xproc/calabash/lib. Otherwise xmlcalabash1-plantuml will complain about net.sourceforge.plantuml.SourceStringReader.
  • Add new entries for both libraries in the $OXYGEN_HOME/lib/xproc/calabash/engine.xml file
  • Modify or, as in my case, create the file $OXYGEN_HOME/lib/xproc/calabash/lib/calabash.config. See below.
  • Don't forget to restart the Oxygen Application after modifications in the libriry Folder or any configuration file
The new created calabash.config file reads in my case like this:

Code: Select all

<xproc-config xmlns="http://xmlcalabash.com/ns/configuration"
    xmlns:px="http://www.daisy.org/ns/pipeline/xproc"
    xmlns:cx="http://xmlcalabash.com/ns/extensions">

    <implementation type="cx:plantuml" class-name="com.xmlcalabash.extensions.PlantUML"/>

</xproc-config>
It was a lot of work and frustrating experiments. I hope this report will help others. However, i would really appreciate when your company would include ready-to-use Calabash extensions in the next Oxygen Release.

Thanks,
Frank
Mircea
Posts: 131
Joined: Tue Mar 25, 2003 11:21 am

Re: How to use Calabash Extensions for XProc

Post by Mircea »

Hello Frank,

This is good news. Thank you explaining for other users the way you made it work !

Regards,
Mircea
Mircea Enachescu
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply