Thanks for the advice, Jasper.

I realize that one way of dynamically inserting blocks of code is to use
CInclude. I actually tried this, but it ends up being much more complicated
than it has to in many ways (maintenance, debugging, processing speed)... I
quickly got frustrated with the results, and I think that there must be a
better way.

If I could process each component as a sub-pipeline, exactly like
<map:aggregate> does, and use the results of this sub-pipeline in the main
pipeline, I figure that this would be much simpler. <map:aggregate> is
magical for this... but you need to know in advance what you want to
aggregate.

My problem is that I don't know in advance what the components are... and
I'm not really sure how to dynamically aggregate these different blocks as
separate sub-pipelines at runtime.


Any help on this would be very much appreciated.


Thanks!




> -----Original Message-----
> From: Jasper Michalczik [mailto:[EMAIL PROTECTED]
> Sent: May 10, 2004 5:45
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: AW: Dynamic aggregation
>
>
> The Cinclude Transformer might be what you're looking for: Try
> http://wiki.cocoondev.org/Wiki.jsp?page=AddCIncludeToMinimalSitemap or
> http://wiki.cocoondev.org/Wiki.jsp?page=CInclude for help on using it.
> Maybe you can find additional information in the cocoon docs...
>
>
> Jasper Michalczik
>
>
> -----Urspr�ngliche Nachricht-----
> Von: David Leangen [mailto:[EMAIL PROTECTED]
> Gesendet: Sonntag, 9. Mai 2004 21:29
> An: [EMAIL PROTECTED]
> Betreff: Dynamic aggregation
>
>
> I am trying to do some dynamic aggregation, but without success so far.
>
> Unfortunately, <map:aggregate> doesn't do the trick for me simply
> because it
> requires that you first know what parts you want to aggregate. In my
> case, I
> don't know in advance what or how many components will be aggregated.
>
> I did some searching on the archives and found this:
>
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107279968120084&w=2
>
>
> However, this seems a bit complicated.
>
> I also tried doing a kind of "forEach" for each of my components in the
> flowscript, but quickly realised that this doesn't work when I saw the
> error
> [1] below.
>
>
> Is there a simpler way to do dynamic aggregation?
>
>
> Thanks!
>
>
>
>
>
> [1] error message:
>
> org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
> org.apache.avalon.framework.CascadingRuntimeException: "file:/flow.js",
> line
> xxx: uncaught JavaScript exception: at showComponent (file:/flow.js,
> Line
> xxx): java.lang.IllegalStateException: Pipeline has already been
> processed
> for this request
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to