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

Re: Calabash: register an extension step through the API

From: Florent Georges <fgeorges@fgeorges.org>
Date: Tue, 6 Sep 2011 10:54:20 +0200
Message-ID: <CADyR_r3h6aFW6ebkN_cmFMpy08Uc5yQP1Bh=hsOAQHS-D_AyTQ@mail.gmail.com>
To: Romain Deltour <rdeltour@gmail.com>
Cc: XProc Dev <xproc-dev@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 6 September 2011 08:55:18 GMT