You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Lorenzo De Sio <l....@w4b.it> on 2003/02/06 11:56:51 UTC

macros vs. resources

Hi all,

I was wondering about a way to group together several transformations in a
single reusable pipeline fragment.

Currently, <map:resource/> seems to not allow that, since a resource doesn't
return control to its caller:

<wiki-snip uri="http://wiki.cocoondev.org/Wiki.jsp?page=Resources">
However resources are not like a macro, which might describe a pipeline
fragment. The flow of processing does not return from the point at which the
resource is called. Therefore a resource must be a complete pipeline, or
must invoke another resource which is a complete pipeline. To put this
differently, a resource is called and this call must eventually end up at a
Serializer or Reader. The call may progress through several other resources
which might, for example, contain Selector or Actions that further affect
the flow of processing but must end up at a pipeline terminating component. 
</wiki-snip>

It seems like there is no easy way to do this. And writing a custom
Transformer seems a big problem to me, since I need to combine three XSL
transformations and a CInclude transformation.

Any ideas? :-)


L.





---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>