You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@anyware-tech.com> on 2003/07/28 14:54:31 UTC

Re: processing flow for

Joerg Heinicke wrote:

> (Moving this discussion to dev list because it implies an more or less 
> important change - wanted or not.)
>
> The problem: Does the processing return to a calling pipeline after 
> <map:call resource=""/>?
>
> The docu at 
> http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html#Calling+resources 
> and http://wiki.cocoondev.org/Wiki.jsp?page=Resources says no (to 
> whatever reasons). But I saw Marc's example at 
> http://wiki.cocoondev.org/Wiki.jsp?page=CleanerSiteMapsThroughResources 
> and he tested it again and it worked, i.e. the processing flow *does* 
> return to the calling pipeline.
>
> Is this change implied? What were the pros and contras of this 
> behaviour? I only know the old behaviour and, yes, the return makes 
> the sitemap pipeline snippets more flexible. And who updates the docu ;-)
>
> Can anybody say something about it?


Yes : the culprit is me ;-)

The compiled sitemap engine enforced the "doesn't return" feature. When 
writing the interpreted engine (the only one available in 2.1), I 
introduced a "bug" which was causing resources to return if the 
processing wasn't terminated. As resources were meant to close the 
pipeline, this made no difference... until the day where someone forgot 
to close it and discovered we could return from resources.

So we can consider resources as "gosub" and no more "goto" as stated in 
the doc. Moreover, since resources can be passed parameters, they are 
actually functions ! I can't remember if a formal vote occured on this, 
but people globally found this feature usefull.

Time to update the docs...

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Re: processing flow for

Posted by Marc Portier <mp...@outerthought.org>.

Sylvain Wallez wrote:
> Joerg Heinicke wrote:
> 

<snip />

> So we can consider resources as "gosub" and no more "goto" as stated in 
> the doc. Moreover, since resources can be passed parameters, they are 
> actually functions ! I can't remember if a formal vote occured on this, 
> but people globally found this feature usefull.

             ^^^^^^^^^^

the man is so honest, there was actually a sigh of relieve 
throughout the entire galaxy :-)

much of the viewed side-effects to be observed here:
http://hubblesite.org/newscenter/archive/

> 
> Time to update the docs...
> 

I'm prepping up a rewrite of some the wiki pages as a doco patch 
(unless someone beats me to it)

> Sylvain
> 

-marc=
-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at              http://radio.weblogs.com/0116284/
mpo@outerthought.org                              mpo@apache.org