cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boisvert, Éric" <ebois...@nrcan.gc.ca>
Subject RE: How to send parameters to a URL via http?
Date Mon, 24 Oct 2005 16:26:13 GMT
 
 
If the parameters are passed through GET method, you can use
 
<map:generate src="http://somesite.org/getpage?{request:queryString}"/>
 
This will append all parameter received by the pipeline.

-----Message d'origine-----
De : bburridg@gmail.com [mailto:bburridg@gmail.com]De la part de Brian
Burridge
Envoyé : 24 octobre, 2005 11:06
À : users@cocoon.apache.org
Objet : Re: How to send parameters to a URL via http?


Problem is, I want to send all requests to this url, with any and all
request params. I won't know 
what they are in advance to hard code them in the sitemap.



Is there a way to get the xml from the RequestGenerator and send that as a
param?



<map:generate

src="
http://www.somesite.org/getpage?page={request-parameter:xmlFromRequestGenera
tor}"/
<http://www.somesite.org/getpage?page={request-parameter:xmlFromRequestGener
ator}> >

Brian


On 10/24/05, Upayavira < uv@odoko.co.uk <mailto:uv@odoko.co.uk> > wrote: 

Brian Burridge wrote:
> I don't think I was as clear as I should have been. I don't have any
aggregating to do. I want
> to include the parameters in the call to an external URL, which will
return XML. But once 
>
>  that external XML comes back, it is the only xml I need in the pipeline.
I don't need to
> append the request params or anything else to it.
>
> Where the confusion might have come in, is that I was suggesting I'd
prefer to send the 
> resulting xml from the RequestGenerator to the external url as a
parameter.

Maybe all you need is:

<map:generate
src="  <http://www.somesite.org/getpage?page={request-parameter:pageName}>
http://www.somesite.org/getpage?page={request-parameter:pageName}"/>

This will insert the 'pageName' request parameter into the URL from
which you are collecting the source to be parsed by the generator. 

Regards, Upayavira

> On 10/24/05, *Chris Marasti-Georg* < cgeorg@rjlg.com
<mailto:cgeorg@rjlg.com> 
> <mailto: cgeorg@rjlg.com <mailto:cgeorg@rjlg.com> >> wrote:
>
>     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:  <mailto:a.schrijvers@hippo.nl>
a.schrijvers@hippo.nl
>     <mailto: a.schrijvers@hippo.nl <mailto:a.schrijvers@hippo.nl> >]
>     > Sent: Monday, October 24, 2005 5:00 AM
>     > To: users@cocoon.apache.org <mailto:users@cocoon.apache.org>
<mailto: users@cocoon.apache.org <mailto:users@cocoon.apache.org> >
>     > 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
<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
<http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html#Ag> 
>     < http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html#Ag
<http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html#Ag>  >
>     > > gregating
>     > >
>     > > -Bertrand
>     > >
>     > >
>     > >
>     >
--------------------------------------------------------------------- 
>     > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
<mailto:users-unsubscribe@cocoon.apache.org> 
>     <mailto: users-unsubscribe@cocoon.apache.org
<mailto:users-unsubscribe@cocoon.apache.org> >
>     > > For additional commands, e-mail: users-help@cocoon.apache.org
<mailto:users-help@cocoon.apache.org> 
>     <mailto: users-help@cocoon.apache.org
<mailto:users-help@cocoon.apache.org> >
>     > >
>     > >
>     >
>     >
---------------------------------------------------------------------
>     > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
<mailto:users-unsubscribe@cocoon.apache.org> 
>     <mailto: users-unsubscribe@cocoon.apache.org
<mailto:users-unsubscribe@cocoon.apache.org> >
>     > For additional commands, e-mail: users-help@cocoon.apache.org
<mailto:users-help@cocoon.apache.org> 
>     <mailto: users-help@cocoon.apache.org
<mailto:users-help@cocoon.apache.org> >
>     >
>     >
>
>     --------------------------------------------------------------------- 
>     To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
<mailto:users-unsubscribe@cocoon.apache.org> 
>     <mailto: users-unsubscribe@cocoon.apache.org
<mailto:users-unsubscribe@cocoon.apache.org> >
>     For additional commands, e-mail: users-help@cocoon.apache.org
<mailto:users-help@cocoon.apache.org> 
>     <mailto: users-help@cocoon.apache.org
<mailto:users-help@cocoon.apache.org> >
>
>


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





Mime
View raw message