Thursday, October 30, 2008

Poor man's Calabash integration into oXygen

[[ Note on 2009-11-12: oXygen 11.0 comes with built-in support for XProc and Calabash, so you don't need this anymore if you have oXygen 11+. ]]

XML Calabash, the XProc processor from Norman Walsh, becomes more mature from day to day. Here is a very simple (but very limited too) way to integrate it into the great oXygen XML IDE. Well, the word integrate is maybe too much for this simple trick, that will just add a button in the toolbar to execute the currently edited XProc definition file. But at least that will prevent you to switch between your IDE and a console.

You have to register Calabash as an external tool within oXygen. Go to Tools > External Tools > Preferences > New, and fill the various fields. The point is to correctly set the working directory to ${cfd} and the command line to something like:

java -cp ".../calabash.jar:.../saxon9.jar:.../saxon9-s9api.jar"
    com.xmlcalabash.drivers.Main ${cfne}

Of course, you have to set the absolute path to the JAR files on your machine. Be sure to use ":" as the path separator on Linux and ";" on Windows. You can also set additional options like -Dcom.xmlcalabash.phonehome.email=your@email.com. In other words, just use the command line you usually use to launch Calabash.

When this is done, you will have a new button on your toolbar, called Calabash (be sure to have selected the External Tools toolbar.) When your are editing an XProc definition, you can press that button to execute it with Calabash, viewing the output in the result panel.

Labels: , ,

4 Comments:

Blogger PaulH said...

Are you also using the XProc schemes (RelaxNG or XSD) withing Oxygen?

I've tried but get all kinds of errors.

09:12  
Blogger Florent Georges said...

Hi,

I think Calabash requires Saxon SA (the commercial, schema-aware version of Saxon) for the validation step with XML Schema. For RELAX NG, it uses MSV and ISO RELAX, both must be installed separately.

I think for now the best place to ask experts about XProc is the list XProc Dev.

Hope that helps,

--
Florent Georges
http://www.fgeorges.org/

10:17  
Blogger Florent Georges said...

Maybe I misunderstood your comment, and maybe you are after something like in the following entry: XProc with XSLT completion in oXygen. Hope that helps,

--
Florent Georges
http://www.fgeorges.org/

19:50  
Anonymous Anonymous said...

Hi,

You could update your article on xproc and oxygen given xproc is now integrated. It led me astray to some extent when I was trying to add a configuration for calabash with nothing happening and no message like you dork this is already integrated.

Regards
dork

23:46  

Post a Comment

Links to this post:

Create a Link

<< Home