Re: Calabash: register an extension step through the API

On 6 September 2011 09:28, Romain Deltour wrote:

  Hi Romain,

> There is now a new API in XProcConfiguration with a
> newStep(XProcRuntime, XAtomicStep) method that can be
> overridden by a subclass to extend the step registration
> mechanism.

  Thanks.  But from what I see, that's not what I understand this
method does.  I'd see it rather instantiates an implementation,
corresponding to a step (in particular its type name).  It gets
the step's type name, looks up in the extension steps map, and
instantiates the class if one is found.

  And I don't how a subclass can override this method to add
anything in the implementations map, given it is... public?  Oh,
wait a minute, is this field public?  Well, ahem, I don't really
need a new method, then :-/

  And now that I already wrote my response, I only understand
what you mean.  You don't mean that overriding the method is a
way to add a binding to the implementations map, but rather a way
to extend the extension mechanism itself by overriding the only
places it is used from (I guess you overrided isStepAvailable()
as well).

  Interesting, e.g. to experiment with a new extension mechanism
(based on an ExtensionStep class, providing all infos directly
from Java, a bit like the extension functions in Saxon 9.2+), and
that directly from the user space :-)

  Thanks for your ideas!

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/

Received on Tuesday, 6 September 2011 08:55:17 UTC