W3C home > Mailing lists > Public > xproc-dev@w3.org > September 2010

Java API for custom steps

From: Bruce Chapman <bruce.chapman@nec.co.nz>
Date: Tue, 14 Sep 2010 11:19:49 +1200
To: xproc-dev@w3.org
Message-id: <6DC5CEB5830747C182613E9D0FC914EE@necwlgxpwapp210>
On a related note,

I have been working on a means to write extension steps in such a way that
they can be plugged in to any (reasonable) JVM based xproc processor.

I have a proof of concept working, where the steps are written against JDK
APIs only, and inputs, outputs, and options are declared with specially
annotated methods on a class that implements Step (which just has a run()
and a reset() method)

I have an annotation processor which takes such step
declarations/implementations and generates a wrapper class for each and the
config file and xproc library declaration to allow the wrappers to be
available to and called from Calabash.

I haven't needed to handle sequences yet so that is still to be implemented.

After that I want to write the processor to generate the wrappers for

It is my intention to release this to the community at some point.

This is just to let people know that it is being worked on.


-----Original Message-----
From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On Behalf
Of Cranford, Jonathan W.
Sent: Tuesday, 14 September 2010 3:35 a.m.
To: Dave; xproc-dev@w3.org
Cc: Norman Walsh
Subject: Re: Java API for Calabash


With apologies for resurrecting an old thread, the approach that Dave
highlights below is exactly the approach that I took.

I recently obtained permission from my company to donate my efforts under
the same GPL+CDDL license as the rest of Calabash, so I’m sending it out to
the list for the benefit of anyone else facing a similar need.

* com.xmlcalabash.api.Facade implements a Fašade pattern in front of key
Calabash classes.  The intent is to simply the interface to Calabash without
decreasing the flexibility available to the programmer.  

* com.xmlcalabash.util.ErrorMessageRegistry is a utility class that reads
error messages from a configuration file already in the calabash

* FacadeDriver is test code simply meant to demonstrate a working example of
using the Facade class.

The package names are only notional at this point; they can be moved to a
different package with ease.  The only dependency is between Facade and

Norm, I’d be glad to assist in any additional prep work needed to integrate
these two classes into the calabash code base.

With best regards,

Jonathan Cranford
The MITRE Corporation

From: Dave [mailto:dhallammail-xproc@yahoo.com] 
Sent: Wednesday, June 09, 2010 5:30 PM
To: xproc-dev@w3.org

Hi all,

I've seen a number of postings from mid-2009 talking about a Java API for
Calabash and the end solution was to strip code from
com.xmlcalabash.drivers.Main to add to their own applications so that
Calabash can be invoked from within an application. 

Is there a different approach that people are taking now or does that
solution still stand?

Many thanks,

Received on Monday, 13 September 2010 23:20:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:07 UTC