On Tue, 16 Apr 2002 20:01:28 +0200, Mats Norén <[EMAIL PROTECTED]> wrote:
> Ovidiu, > > > I think actions should work fine if you put them right before > > <map:call function="..."/> in a pipeline. Actions don't generate any > > SAX events on the pipeline, so they should not interfere with the > > later invocation of the sitemap via sendPage() or > > sendPageAndContinue() functions. > > I was more thinking about a way to dynamically plug them into the > flow-scripts.. :) > Since they don´t interfere with the pipelines... > DatabaseActions in perticular could prove useful. > I remember that there were some discussions about actions and their > whereabouts but I don´t remember the conclusions (if there were any) :) So how would you like to describe these actions? Have them be invoked without you coding an explicit function call to them? What you can do is call a trampoline function, which does the action first, and then calls your function. Something like this: <map:match pattern="..."> <map:call function="doAction"> <map:parameter name="func" value="startFlow"/> // Arguments for the 'startFlow' function if any should go here </map:call> </map:match> In your script you'd then have something like: function doAction(func, args) { // Do your action here ... // Now call the function that executes the control flow func.apply(this, args); } function startFlow(arg1, arg2, arg3 etc.) { // Do your flow here } To also have the actions executed when continuations are restarted, I'll add the ability to specify a different function that handles them. You'll then be able to specify your own continuation restarting function (currently that's hard-coded to handleContinuation). Something like this: function myContinuationHandler(kont, args) { doAction(kont.continuation, args); } Is this the same thing you were looking for? Greetings, -- Ovidiu Predescu <[EMAIL PROTECTED]> http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]