Hi Brian,
Have you copied the flowscript code literally? The variable uri is not defined. Replace it by a
string literal or pass a uri parameter to the function from the sitemap..
HTH,
Geert
Brian Burridge wrote:
I've added your code and I keep getting an error:
org.apache.cocoon.ProcessingException: Generator already set. Cannot set
generator 'file' at [unknown location]
Any idea why?
Brian
On 10/24/05, *Ard Schrijvers* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
You could do it easily with flow-script:
<map:match pattern="foo">
<map:aggregate element="someparts">
<map:part element="ext"
src="cocoon:/getthistroughflow"/>
</map:aggrate>
</map:match>
<map:match pattern="getthistroughflow">
<map:call function="post2requestUri"/>
</map:match>
in flow:
function post2requestUri{
var queryString = "";
for (var i in cocoon.getParameterNames){
queryString += loop through paramters and put them in
querystring
}
cocoon.sendPage(uri+queryString) ;
}
In fact, pretty lousy solution but probably works just fine
> Word of caution - if the request is a post, the queryString
> will be empty. If anyone knows a way around that one, please
> post - I have forms that I'd really like to post but are a
> get for now, because I don't know what params will be present!
>
> Chris Marasti-Georg
>
> > -----Original Message-----
> > From: Ard Schrijvers [mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>]
> > Sent: Monday, October 24, 2005 5:00 AM
> > To: [email protected] <mailto:[email protected]>
> > Subject: RE: How to send parameters to a URL via http?
> >
> > I don't think Brian is much helped with this, because what he
> > wants is something like:
> >
> > <map:match pattern="bla/bla">
> > <map:aggregate element"yi">
> > <map:part element="ext"
> > src="fetchExtURI-incl-currentParameters"/>
> > <map:part element="somemorexml" src="yi2"/>
> > </map:aggregate>
> > <map:tramsform .....etc
> >
> > </map:match>
> >
> > What Brians problem is is how to append the currentParameters
> > to the external xml fetch. I am not really sure about the
> > syntax, but something like
> >
> > <map:part element="ext"
> > src="fetchExtURI?{request-param:queryString}"/> should do the job.
> >
> > AS
> >
> > > Le 24 oct. 05, à 05:49, Brian Burridge a écrit :
> > >
> > > > ... I see the File Generator can get xml from a url, but I
> > > don't see a
> > > > way to be able to include any parameters, or even better
> > > include the
> > > > xml the RequestGenerator can create, and pass that as a
> > parameter...
> > >
> > > You need a map:aggregate to combine the output of both
> > generators, see
> > >
> > >
http://cocoon.apache.org/2.1/userdocs/concepts/sitemap-examples.html
> > (which also shows how to pass request parameters to an XSLT
> transform
> > directly, using use-request-parameters)
> >
> > http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html#Ag
> > gregating
> >
> > -Bertrand
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
> >
> >
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
--
Drs. G.P.H. Josten
Consultant
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is
uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken
wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]