You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jeff Jones <JA...@weather.com> on 2004/06/25 17:35:57 UTC

Modifying pipeline at request time?

I would like to be able to dynamically generate and/or modify a pipeline at
request time, so that I can create an aggregated response using one or more
sub-documents, to be chosen based on the request. I'd also like to be able to
choose, at the same time, appropriate Transformers depending on the data
requested, and probably choose a Serializer as well. In short, I'd like to be
able to build a pipeline from scratch at request time.

I'd really rather not do this by performing if/else logic with a Selector in the
sitemap, because I don't want to have to edit it every time I create a new type
of sub-document.

I'm open to writing an action, using Flowscript, or just about anything else
that will perform well. I looked at the API for pipeline-related classes, but I
didn't see an obvious place to start. I'm also happy to achieve the same result
some other way, as long as it lets me choose data sources, transforms, and
output format at request time. Can anyone suggest an approach I should look at?

(By the way: I'm using Cocoon 2.1.5/Tomcat 4.1/Apache 2 on Linux. Open source is
a Good Thing.)

Thanks for your help!

</Jeff>



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


Re: Cocoon Error in jboss-4DR4

Posted by Joerg Heinicke <jo...@gmx.de>.
On 28.06.2004 10:16, andi wrote:

> Dear all i just experiment to implement cocoon.war  in jboss 
> the configuration like this 
> cocoon-2.1.5\build\webapp i copy all in that directory to 
> jboss_home\server\default\deploy\cocoon.war cocoon.war is directory
> 
> i get the error message when i try to 

If you were so kind to tell us which error message?

> 1. http://localhost:8080/cocoon/samples/blocks/javaflow/showEmployee.do

For the JavaFlow stuff it can easily be a classloader issue: BCEL, 
XSTLC, RegExp.

> 2. http://localhost:8080/cocoon/samples/blocks/forms/form2xml.flow

For the flowscript, too, but there is only one problematic package: Rhino.

But maybe it's just an endorsed libs issue.

Joerg

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


Re: javaflow Cocoon Error in jboss-4DR4 is this question has been posted ?

Posted by Stephan Michels <st...@apache.org>.
Am Mi, den 30.06.2004 schrieb andi um 6:01:
> Dear all i just experiment to implement cocoon.war  in jboss 
> the configuration like this 
> cocoon-2.1.5\build\webapp i copy all in that directory to 
> jboss_home\server\default\deploy\cocoon.war cocoon.war is directory
> 
> i get the error message when i try to 
> 
> 1. http://localhost:8080/cocoon/samples/blocks/javaflow/showEmployee.do
> 
> 2. http://localhost:8080/cocoon/samples/blocks/forms/form2xml.flow

Which error message do you get? You must tell us more information
if you want that we help you.

Stephan.


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


javaflow Cocoon Error in jboss-4DR4 is this question has been posted ?

Posted by andi <an...@acc.co.id>.
Dear all i just experiment to implement cocoon.war  in jboss 
the configuration like this 
cocoon-2.1.5\build\webapp i copy all in that directory to 
jboss_home\server\default\deploy\cocoon.war cocoon.war is directory

i get the error message when i try to 

1. http://localhost:8080/cocoon/samples/blocks/javaflow/showEmployee.do

2. http://localhost:8080/cocoon/samples/blocks/forms/form2xml.flow

please any kind help is appreciate, thank you 
but if i change to jetty web server it's okey.

pelase help me.Thank you

best regards 

andi kusnadi


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



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


javaflow Cocoon Error in jboss-4DR4 is this question has been posted ?

Posted by andi <an...@acc.co.id>.
Dear all i just experiment to implement cocoon.war  in jboss 
the configuration like this 
cocoon-2.1.5\build\webapp i copy all in that directory to 
jboss_home\server\default\deploy\cocoon.war cocoon.war is directory

i get the error message when i try to 

1. http://localhost:8080/cocoon/samples/blocks/javaflow/showEmployee.do

2. http://localhost:8080/cocoon/samples/blocks/forms/form2xml.flow

please any kind help is appreciate, thank you 
but if i change to jetty web server it's okey.

pelase help me.Thank you

best regards 

andi kusnadi


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


Cocoon Error in jboss-4DR4 is this question has been posted ?

Posted by andi <an...@acc.co.id>.

Dear all i just experiment to implement cocoon.war  in jboss 
the configuration like this 
cocoon-2.1.5\build\webapp i copy all in that directory to 
jboss_home\server\default\deploy\cocoon.war cocoon.war is directory

i get the error message when i try to 

1. http://localhost:8080/cocoon/samples/blocks/javaflow/showEmployee.do

2. http://localhost:8080/cocoon/samples/blocks/forms/form2xml.flow

please any kind help is appreciate, thank you 
but if i change to jetty web server it's okey.

pelase help me.Thank you

best regards 

andi kusnadi


---------------------------------------------------------------------
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: Cocoon Error in jboss-4DR4

Posted by andi <an...@acc.co.id>.
Dear all i just experiment to implement cocoon.war  in jboss 
the configuration like this 
cocoon-2.1.5\build\webapp i copy all in that directory to 
jboss_home\server\default\deploy\cocoon.war cocoon.war is directory

i get the error message when i try to 

1. http://localhost:8080/cocoon/samples/blocks/javaflow/showEmployee.do

2. http://localhost:8080/cocoon/samples/blocks/forms/form2xml.flow

please any kind help is appreciate, thank you 
but if i change to jetty web server it's okey.

pelase help me.Thank you

best regards 

andi kusnadi


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


Cocoon Error in jboss-4DR4

Posted by andi <an...@acc.co.id>.
Dear all i just experiment to implement cocoon.war  in jboss 
the configuration like this 
cocoon-2.1.5\build\webapp i copy all in that directory to 
jboss_home\server\default\deploy\cocoon.war cocoon.war is directory

i get the error message when i try to 

1. http://localhost:8080/cocoon/samples/blocks/javaflow/showEmployee.do

2. http://localhost:8080/cocoon/samples/blocks/forms/form2xml.flow

please any kind help is appreciate, thank you 

best regards 

andi kusnadi


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


Re: Modifying pipeline at request time?

Posted by Ralph Goers <Ra...@dslextreme.com>.
He asked if it was possible.  I agree - I would never dynamically generate 
a sitemap. Debugging and maintaining that could be a nightmare.

Ralph

At 6/27/2004  05:37 AM, you wrote:
>On 27.06.2004 01:28, Ralph Goers wrote:
>>I should think one could write an action that generates a sub-sitemap and 
>>then cause that sub-sitemap to be invoked from the action using a source 
>>resolver.
>
>Ok, this *might* work, but it sounds hacky and will be a hell to maintain, 
>won't it?
>
>IMO having many different pipelines, one for each document type, and 
>reusing the common parts via resources is much cleaner.
>
>Joerg
>
>>At 6/26/2004  08:17 AM, Joerg Heinicke wrote:
>>
>>>>I would like to be able to dynamically generate and/or modify a pipeline at
>>>>request time, so that I can create an aggregated response using one or more
>>>>sub-documents, to be chosen based on the request. I'd also like to be 
>>>>able to
>>>>choose, at the same time, appropriate Transformers depending on the data
>>>>requested, and probably choose a Serializer as well. In short, I'd like 
>>>>to be
>>>>able to build a pipeline from scratch at request time.
>>>>I'd really rather not do this by performing if/else logic with a 
>>>>Selector in the
>>>>sitemap, because I don't want to have to edit it every time I create a 
>>>>new type
>>>>of sub-document.
>>>>I'm open to writing an action, using Flowscript, or just about anything 
>>>>else
>>>>that will perform well. I looked at the API for pipeline-related 
>>>>classes, but I
>>>>didn't see an obvious place to start. I'm also happy to achieve the 
>>>>same result
>>>>some other way, as long as it lets me choose data sources, transforms, and
>>>>output format at request time. Can anyone suggest an approach I should 
>>>>look at?
>>>
>>>
>>>That's not possible, the pipeline setup is the first thing that is done. 
>>>What you can do is to give the control over the pipeline selection 
>>>(read: not setup) to the flow and select dependent on the document type 
>>>the correct pipeline. When using resources you should reach a high level 
>>>of reusability. The dynamic aggregation can be done using CInclude or XInclude.
>>>
>>>Joerg
>
>---------------------------------------------------------------------
>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: Modifying pipeline at request time?

Posted by defe <de...@free.fr>.
One can also select components (the avalon way). And thus code a few 
wrapper cocoon
components that setup their inner instance (based on a role parameter) 
and delegate the work.
Anyway this may only work with a fixed number of components
something like:
   <map:generate type="wrapper-generator" src="...">
       <map:parameter name="role" value="file"/>
   </map:generate>
    <map:transform type="wrapper-transformer" src="...">
        <map:parameter name="role" value="xslt"/>
    <map:transform>
    <map:serialize type="wrapper-serializer">
        <map:parameter name="role" value="html"/>
    </map:serialize>

hmm... completly twisted, isn't it?

> On 27.06.2004 01:28, Ralph Goers wrote:
>
>> I should think one could write an action that generates a sub-sitemap 
>> and then cause that sub-sitemap to be invoked from the action using a 
>> source resolver.
>
>
> Ok, this *might* work, but it sounds hacky and will be a hell to 
> maintain, won't it?
>
> IMO having many different pipelines, one for each document type, and 
> reusing the common parts via resources is much cleaner.
>
> Joerg
>
>> At 6/26/2004  08:17 AM, Joerg Heinicke wrote:
>>
>>>> I would like to be able to dynamically generate and/or modify a 
>>>> pipeline at
>>>> request time, so that I can create an aggregated response using one 
>>>> or more
>>>> sub-documents, to be chosen based on the request. I'd also like to 
>>>> be able to
>>>> choose, at the same time, appropriate Transformers depending on the 
>>>> data
>>>> requested, and probably choose a Serializer as well. In short, I'd 
>>>> like to be
>>>> able to build a pipeline from scratch at request time.
>>>> I'd really rather not do this by performing if/else logic with a 
>>>> Selector in the
>>>> sitemap, because I don't want to have to edit it every time I 
>>>> create a new type
>>>> of sub-document.
>>>> I'm open to writing an action, using Flowscript, or just about 
>>>> anything else
>>>> that will perform well. I looked at the API for pipeline-related 
>>>> classes, but I
>>>> didn't see an obvious place to start. I'm also happy to achieve the 
>>>> same result
>>>> some other way, as long as it lets me choose data sources, 
>>>> transforms, and
>>>> output format at request time. Can anyone suggest an approach I 
>>>> should look at?
>>>
>>>
>>>
>>> That's not possible, the pipeline setup is the first thing that is 
>>> done. What you can do is to give the control over the pipeline 
>>> selection (read: not setup) to the flow and select dependent on the 
>>> document type the correct pipeline. When using resources you should 
>>> reach a high level of reusability. The dynamic aggregation can be 
>>> done using CInclude or XInclude.
>>>
>>> Joerg
>>
>
> ---------------------------------------------------------------------
> 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: Modifying pipeline at request time?

Posted by Joerg Heinicke <jo...@gmx.de>.
On 27.06.2004 01:28, Ralph Goers wrote:
> I should think one could write an action that generates a sub-sitemap 
> and then cause that sub-sitemap to be invoked from the action using a 
> source resolver.

Ok, this *might* work, but it sounds hacky and will be a hell to 
maintain, won't it?

IMO having many different pipelines, one for each document type, and 
reusing the common parts via resources is much cleaner.

Joerg

> At 6/26/2004  08:17 AM, Joerg Heinicke wrote:
> 
>>> I would like to be able to dynamically generate and/or modify a 
>>> pipeline at
>>> request time, so that I can create an aggregated response using one 
>>> or more
>>> sub-documents, to be chosen based on the request. I'd also like to be 
>>> able to
>>> choose, at the same time, appropriate Transformers depending on the data
>>> requested, and probably choose a Serializer as well. In short, I'd 
>>> like to be
>>> able to build a pipeline from scratch at request time.
>>> I'd really rather not do this by performing if/else logic with a 
>>> Selector in the
>>> sitemap, because I don't want to have to edit it every time I create 
>>> a new type
>>> of sub-document.
>>> I'm open to writing an action, using Flowscript, or just about 
>>> anything else
>>> that will perform well. I looked at the API for pipeline-related 
>>> classes, but I
>>> didn't see an obvious place to start. I'm also happy to achieve the 
>>> same result
>>> some other way, as long as it lets me choose data sources, 
>>> transforms, and
>>> output format at request time. Can anyone suggest an approach I 
>>> should look at?
>>
>>
>> That's not possible, the pipeline setup is the first thing that is 
>> done. What you can do is to give the control over the pipeline 
>> selection (read: not setup) to the flow and select dependent on the 
>> document type the correct pipeline. When using resources you should 
>> reach a high level of reusability. The dynamic aggregation can be done 
>> using CInclude or XInclude.
>>
>> Joerg

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


Re: Modifying pipeline at request time?

Posted by Ralph Goers <Ra...@dslextreme.com>.
I should think one could write an action that generates a sub-sitemap and 
then cause that sub-sitemap to be invoked from the action using a source 
resolver.

At 6/26/2004  08:17 AM, Joerg Heinicke wrote:
>On 25.06.2004 17:35, Jeff Jones wrote:
>
>>I would like to be able to dynamically generate and/or modify a pipeline at
>>request time, so that I can create an aggregated response using one or more
>>sub-documents, to be chosen based on the request. I'd also like to be able to
>>choose, at the same time, appropriate Transformers depending on the data
>>requested, and probably choose a Serializer as well. In short, I'd like to be
>>able to build a pipeline from scratch at request time.
>>I'd really rather not do this by performing if/else logic with a Selector 
>>in the
>>sitemap, because I don't want to have to edit it every time I create a 
>>new type
>>of sub-document.
>>I'm open to writing an action, using Flowscript, or just about anything else
>>that will perform well. I looked at the API for pipeline-related classes, 
>>but I
>>didn't see an obvious place to start. I'm also happy to achieve the same 
>>result
>>some other way, as long as it lets me choose data sources, transforms, and
>>output format at request time. Can anyone suggest an approach I should 
>>look at?
>
>That's not possible, the pipeline setup is the first thing that is done. 
>What you can do is to give the control over the pipeline selection (read: 
>not setup) to the flow and select dependent on the document type the 
>correct pipeline. When using resources you should reach a high level of 
>reusability. The dynamic aggregation can be done using CInclude or XInclude.
>
>Joerg
>
>---------------------------------------------------------------------
>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: Modifying pipeline at request time?

Posted by Joerg Heinicke <jo...@gmx.de>.
On 25.06.2004 17:35, Jeff Jones wrote:

> I would like to be able to dynamically generate and/or modify a pipeline at
> request time, so that I can create an aggregated response using one or more
> sub-documents, to be chosen based on the request. I'd also like to be able to
> choose, at the same time, appropriate Transformers depending on the data
> requested, and probably choose a Serializer as well. In short, I'd like to be
> able to build a pipeline from scratch at request time.
> 
> I'd really rather not do this by performing if/else logic with a Selector in the
> sitemap, because I don't want to have to edit it every time I create a new type
> of sub-document.
> 
> I'm open to writing an action, using Flowscript, or just about anything else
> that will perform well. I looked at the API for pipeline-related classes, but I
> didn't see an obvious place to start. I'm also happy to achieve the same result
> some other way, as long as it lets me choose data sources, transforms, and
> output format at request time. Can anyone suggest an approach I should look at?

That's not possible, the pipeline setup is the first thing that is done. 
What you can do is to give the control over the pipeline selection 
(read: not setup) to the flow and select dependent on the document type 
the correct pipeline. When using resources you should reach a high level 
of reusability. The dynamic aggregation can be done using CInclude or 
XInclude.

Joerg

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