Calabash: main driver extensibility


  It seems the main Calabash's driver for the command line suffers
the same problem than Saxon's drivers: it is not really extensible
through derivation, because the whole processing is done in one
single, monolithic method.

  It would be nice to have cut down into smaller
pieces, so one could extend the class and plug his own processing
by overriding the existing methods.  At very least, it would be
nice to be able to deal with the XProcRuntime object right after
its creation.  Something like replacing the following line at the
middle of the file:

    runtime = new XProcRuntime(config);


    runtime = makeRuntime(config);

and adding the following protected method:

     * Create a new runtime object from a configuration object.
     * Override this method if you want to set the runtime object up
     * in any particular way.
    protected XProcRuntime makeRuntime(XProcConfiguration conf)
            throws XProcException
        return new XProcRuntime(conf);


Florent Georges

Received on Sunday, 11 October 2009 20:50:00 UTC