You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "g[R]eK" <gR...@warsztat.pac.pl> on 2004/05/11 10:51:06 UTC

Re[2]: Dynamic aggregation

<. Hi David! .>

Tuesday, May 11, 2004, 3:33:33 AM, you wrote:


>> Now cinclude. It's nearly the same! With the advantage that it works.
>>
>> <map:match pattern="index.html">
>>    <map:generate src="cocoon:/componentsList.xml"/>
>>    <map:transform src="componentsList2cinclude.xsl"/>
>>    <map:transform type="cinclude"/>
>>    <map:transform src="doWhatEverPostProcessing.xsl"/>
>>    <map:serialize type="html"/>
>> </map:match>

DL> Ok... there's just one point that I'm not "getting" here...

DL> In the fictional sitemap above, since we are iterating through each of the
DL> components in componentsList.xml, we are calling a separate pipeline each
DL> time and processing each component individually, exactly like the conceptual
DL> ASCII diagram I drew last time:

DL>  Main pipeline      +-------->
DL>    |                ^
DL>    +- pipeline A ---+
DL>    +- pipeline C ---+
DL>          ...        |
DL>    +- pipeline n ---+


DL> However, in the CInclude example, we're acting on the entire set of
DL> components all at once. IIUC, this approach requires me to process all the
DL> components together as a block in the same pipeline. So:

DL>  Main pipeline-->process A-->process B ... -->continue as above


DL> In other words, the first apporach is more parallel (and easier to design,
DL> code, and maintain), while IIUC the second example does EVERYTHING in
DL> series.


DL> Or am I missing something?

  The second approach is functional the same, or maybe better because you can
  base on the xml results from previous processing stages including passing
  parameters to your XSLT. It mights you to build huge component managing ;-)
  I think you don't understand how CInclude Transformer exacly works.

  If CInclude get something similar:
  <rootelement xmlns:cinclude="http://apache.org/cocoon/include/1.0">
    <cinclude:include src="cocoon:/first.html"/>
    <cinclude:include src="cocoon:/sencod.html"/>
    <cinclude:include src="cocoon:/whatever.html"/>
  </rootelement>

  CInclude will invoke internal request that can be matched by some other
  matcher (for example yours mentioned before), that matcher can do some
  processing operations and return some xml snip that CInclude will include.
  So you don't have to process everything in one pipeline, you can delegate it
  to the other and collect results using CInclude Transformer and cocoon: pseudo
  protocol.

  This link should help you better understand cocoon pseudo protocol:
  http://wiki.cocoondev.org/Wiki.jsp?page=CocoonProtocolExample

-- 
Best regards
<. g[R]eK mailto:gReK@warsztat.pac.pl                                    .>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org