cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Larson <timlarsonw...@yahoo.com>
Subject Re: EffectTransformer/WoodyTemplateTransformer
Date Tue, 14 Oct 2003 19:00:27 GMT
(Note to Javier: I am fowarding my reply to the list, since I saw your
public reply just moments after I had already sent this reply privately)

--- Javier del Gesu <delgesu-cocoon@thinknola.com> wrote:
> This is reassuring. I wrote something similiar to create a SAX
> filter, where processing of diferent nodes is handled by different
> objects.

Thanks for you comments.  In my sequence of attempts to modularize
the WoodyTemplateTransformer, I had one solution that was very similar
to what you describe.  I opted instead for the "event" variable solution
with one common "process" method per handler to allow for easier complex
procedural order-sensitive processing of XML with mixed content
like this:
  <element>
    text <subelement/> text <subelement/> text
  <element>
This is where the poor man's continuations come in handy.  I have some
techniques that allow loops and other code structures to be continued.
These features do not get used in the WoodyTemplateTransformer, but I
plan to use them in processing other structured data in other projects.

I like your put/get interface for communicating data between handlers.
That concept may get used when the Effect transformer gets exteded to
handle multiple inputs and outputs and a few other things...

> That's what I got. I think it is good to know that we both hit upon
> the same solution, using an object stack to gather state.
> 
> -- 
> Javier del Gesu - delgesu@thinknola.com

Pulling the state and control flow out of the handlers and into the
framework lightens the load when coding handlers.  It is interesting
comparing our approaches.  Thanks for sharing.

--Tim Larson


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

Mime
View raw message