You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Hugh Sparks <hu...@csparks.com> on 2010/04/21 17:13:47 UTC
[C3] Adding the cinclude transformer
Would the cinclude transformer be an appropriate / possible / planned addition to Cocoon 3?
If not, how can a C3 transformer process a document to effect a POST request
(with parameters) and return the result to the pipeline? Is there some existing alternative in C3?
Thanks!
Re: [C3] Adding the cinclude transformer
Posted by Simone Tripodi <si...@gmail.com>.
Hi Hugh,
interesting topic, and sorry if I didn't understand your needs earlier :P
I'd appreciate very much if you could
- raise a Jira issue about it
- attach as much info as you have, like C2 link sources, doc, etc
Thank you, have a nice day :)
Simo
http://people.apache.org/~simonetripodi/
On Thu, Apr 22, 2010 at 5:55 PM, Hugh Sparks <hu...@csparks.com> wrote:
> It appears that IncludeTransformer might work if I pass the parameters in
> the url, which would make an ugly mess out of my code.
>
> IncludeTransformer is pretty simple. Would it be appropriate to add optional
> protocol for controlling the request (GET, POST) and passing parameters in
> an element? Or would it be better to add some new thing like a rewrite of
> the old CIncludeTransform?
> It seems excessive to have Include, XInclude, and CInclude...
>
> This is what I'm doing now with C2:
>
> <ci:includexml>
> <ci:configuration>
> <ci:src>http://myserver/cgi-bin/someScript.sh</ci:src>
> <ci:parameter>
> <ci:name>method</ci:name>
> <ci:value>POST</ci:value>
> </ci:parameter>
> </ci:configuration>
> <ci:parameters>
> <ci:parameter>
> <ci:name>param1</ci:name>
> <ci:value>value1</ci:value>
> </ci:parameter>
> ...
> </ci:parameters>
> </ci:include>
>
> I think it would be good for C3 to have some kind of "door" to
> invoke scripts on the server. And cramming things onto the URL
> and using GET isn't very attractive.
>
> Thanks!
>
> -Hugh
>
>
Re: [C3] Adding the cinclude transformer
Posted by Reinhard Pötz <re...@apache.org>.
Hugh Sparks wrote:
> It appears that IncludeTransformer might work if I pass the parameters
> in the url, which would make an ugly mess out of my code.
>
> IncludeTransformer is pretty simple. Would it be appropriate to add
> optional protocol for controlling the request (GET, POST) and passing
> parameters in an element? Or would it be better to add some new thing
> like a rewrite of the old CIncludeTransform?
> It seems excessive to have Include, XInclude, and CInclude...
>
> This is what I'm doing now with C2:
>
> <ci:includexml>
> <ci:configuration>
> <ci:src>http://myserver/cgi-bin/someScript.sh</ci:src>
> <ci:parameter>
> <ci:name>method</ci:name>
> <ci:value>POST</ci:value>
> </ci:parameter>
> </ci:configuration>
> <ci:parameters>
> <ci:parameter>
> <ci:name>param1</ci:name>
> <ci:value>value1</ci:value>
> </ci:parameter>
> ...
> </ci:parameters>
> </ci:include>
>
> I think it would be good for C3 to have some kind of "door" to
> invoke scripts on the server. And cramming things onto the URL
> and using GET isn't very attractive.
I think that it would be the best idea to port the CInclude transformer
of C2. When I wrote the IncludeTransformer, I just did the simplest
possible thing, no POST support or support for parallel include pipeline
execution.
Any contribution would be highly appreciated!
--
Reinhard Pötz Founder & Managing Director, Indoqa
http://www.indoqa.com/people/reinhard-poetz.html
Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member reinhard@apache.org
________________________________________________________________________
Re: [C3] Adding the cinclude transformer
Posted by Hugh Sparks <hu...@csparks.com>.
It appears that IncludeTransformer might work if I
pass the parameters in the url, which would make an
ugly mess out of my code.
IncludeTransformer is pretty simple. Would it be
appropriate to add optional protocol for controlling
the request (GET, POST) and passing parameters in an
element? Or would it be better to add some new thing
like a rewrite of the old CIncludeTransform?
It seems excessive to have Include, XInclude, and
CInclude...
This is what I'm doing now with C2:
<ci:includexml>
<ci:configuration>
<ci:src>http://myserver/cgi-bin/someScript.sh</ci:src>
<ci:parameter>
<ci:name>method</ci:name>
<ci:value>POST</ci:value>
</ci:parameter>
</ci:configuration>
<ci:parameters>
<ci:parameter>
<ci:name>param1</ci:name>
<ci:value>value1</ci:value>
</ci:parameter>
...
</ci:parameters>
</ci:include>
I think it would be good for C3 to have some kind of "door" to
invoke scripts on the server. And cramming things onto the URL
and using GET isn't very attractive.
Thanks!
-Hugh
Re: [C3] Adding the cinclude transformer
Posted by Simone Tripodi <si...@gmail.com>.
Hi Hugh,
very nice to meet you :) I don't know the C2 cinclude, but AFAIK the
C3 relative component is the
org.apache.cocoon.sax.component.IncludeTransformer, already supported
since the alpha-1.
Moreover since the beta-2, C3 supports also XInclude.
Have a nice evening,
Simo
http://people.apache.org/~simonetripodi/
On Wed, Apr 21, 2010 at 5:13 PM, Hugh Sparks <hu...@csparks.com> wrote:
> Would the cinclude transformer be an appropriate / possible / planned
> addition to Cocoon 3?
>
> If not, how can a C3 transformer process a document to effect a POST request
> (with parameters) and return the result to the pipeline? Is there some
> existing alternative in C3?
>
> Thanks!
>
>