You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by David Leangen <dl...@canada.com> on 2004/05/09 21:28:51 UTC

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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Dynamic aggregation

Posted by "g[R]eK" <gR...@warsztat.pac.pl>.
<. Hi David! .>

Sunday, May 9, 2004, 9:28:51 PM, you wrote:


DL> I am trying to do some dynamic aggregation, but without success so far.

DL> Unfortunately, <map:aggregate> doesn't do the trick for me simply because it
DL> requires that you first know what parts you want to aggregate. In my case, I
DL> don't know in advance what or how many components will be aggregated.

DL> I did some searching on the archives and found this:

DL> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107279968120084&w=2


DL> However, this seems a bit complicated.

DL> I also tried doing a kind of "forEach" for each of my components in the
DL> flowscript, but quickly realised that this doesn't work when I saw the error
DL> [1] below.


DL> Is there a simpler way to do dynamic aggregation?

I'm not sure if I understand you, but I think XInclude/CInclude transformer is
what you are looking for.

Try this links:
http://cocoon.apache.org/2.1/userdocs/transformers/xinclude-transformer.html
http://cocoon.apache.org/2.1/userdocs/transformers/cinclude-transformer.html

-- 
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


AW: Dynamic aggregation

Posted by Jasper Michalczik <ja...@gmx.net>.
Hello David,

I'd be interested in seeing some kind of dynamic aggregation inside the
sitemap... would make it much easier. I only know about the cinclude
transformer, but a combination of the directory-generator and the
aggregation would be just perfect. I hope the list gives us some
answer...


Jasper Michalczik



-----Ursprüngliche Nachricht-----
Von: David Leangen [mailto:dleangen@canada.com] 
Gesendet: Sonntag, 9. Mai 2004 22:51
An: users@cocoon.apache.org
Betreff: RE: Dynamic aggregation


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:jasper.m@gmx.net]
> Sent: May 10, 2004 5:45
> To: users@cocoon.apache.org; dleangen@canada.com
> 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:dleangen@canada.com]
> Gesendet: Sonntag, 9. Mai 2004 21:29
> An: users@cocoon.apache.org
> 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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


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


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


RE: Dynamic aggregation

Posted by David Leangen <dl...@canada.com>.
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:jasper.m@gmx.net]
> Sent: May 10, 2004 5:45
> To: users@cocoon.apache.org; dleangen@canada.com
> 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:dleangen@canada.com]
> Gesendet: Sonntag, 9. Mai 2004 21:29
> An: users@cocoon.apache.org
> 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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


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


AW: Dynamic aggregation

Posted by Jasper Michalczik <ja...@gmx.net>.
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:dleangen@canada.com] 
Gesendet: Sonntag, 9. Mai 2004 21:29
An: users@cocoon.apache.org
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


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