cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <Peter.Hunsber...@STJUDE.ORG>
Subject RE: [RT] Virtual Sitemap Components
Date Thu, 22 Jul 2004 15:06:37 GMT
Sylvain Wallez <sylvain@apache.org> writes:

<snip> discussion on what should or should not be allowed in VPCs</snip>

> So let's recap what's allowed where:
> - in virtual generators, transfomers, serializers 
> (SAX-oriented VPCs): 
> match, select, act but no redirect. redirect-to and call are 
> forbidden.

Conceptually I think it makes sense not to allow "call": call is
supposed to be the hook to flow and anything requiring flow control
isn't a VPC.  However, in reality call also provide another capability.
I'm not quite sure what to call it, but it's more or less run-time
composability of pipelines.  I know the issues of dynamic sitemaps, but
there are a couple of use cases where this kind of thing is really
useful, what I'm trying to arrive at here is a rational as to why, and
if perhaps there is a restricted version of call -- similar to the
restricted action (no redirect) -- that would make sense in VPCs?

One general use case for the support of call is the "T" connector.  In
particular the branch to a side pipeline for things like validation.
I've posted before on how we use flow/call to do this, but the net
result is a pipeline that basically uses flow to invoke another pipeline
and then continue on with it's own execution, but the results of the
side pipeline are used to determine whether any actions are taken during
this excursion.

Another use case is iteration within a pipeline.  We've got a use case
that I've posted (with no responses -- I think it's too strange to read
about without seeing a real life example) where we don't know how many
times a particular generator/transform combination must be run in
advance.  Basically, we need to do the equivalent of a VPC calling
itself some unknown number of times in sort of an aggregation scenario:

	<map:vpc name="get-metadata" type="generate">
	   <map:aggregate>
		<map:part name="get-metadata"/>
	   </map:aggregate>
	   <map:transform src="resolve.xsl"/>
	</map:vpc>

I don't know how the vpc machinery would know when to stop calling
itself (maybe a "stopRecurssionException"!)?  With call support I can
essentially do the same thing, but the flow script logic looks at the
results and I can support recognizing a special element to signal that
it is time to return...

So, anyway given all this, my basic question is could VPCs support some
restricted version of call?  Perhaps, with another name, where the
contract was that you could not use any version of  sendPage, only
processPipelineTo?

<snip/>


Mime
View raw message