On Thursday 30 June 2005 09:59, Mike Rowse wrote:
> I'm sorry if this question has an obvious answer, I'm just starting to
> find my way around Cocoon. I have been scouring the net, mailing lists
> and Cocoon docs for a while now. Perhaps the answer is so obvious that
> no one thought to mention it ;). Perhaps its impossible.. :)
> 
> I'm trying to pass requests from Flowscript to a pipeline that generates
> results using xquery from the eXist xmldb. 
> 
> <map:pipeline>
>       <map:match pattern="testFlowRequest">
>               <map:call function="testRequest"/>
>       </map:match>
> </map:pipeline>
>       
> <map:pipeline>
>       <map:match pattern="flowScriptXQuery">
>               <map:generate type="xquery" src="xquery/testReq.xql"/>
>               <map:serialize type="xhtml"/>
>       </map:match>
> </map:pipeline>
> 
> ***************************************************************************
> flowscript -> pretty simple eh? :)
> 
> function testRequest(){
>       var testObj = { "test" : "this worked" };
>       cocoon.request.setAttribute("testing", "blah");
//http://cocoon.apache.org/2.1/userdocs/flow/api.html#sendPage-N100FF
//shouldn't this be something like this?:
cocoon.sendPage("flowScriptXQuery", testObj);

>       cocoon.sendPage("testRequest" : testObj);
> }
> 
> ***************************************************************************
> xquery using eXist (I think that the request: names space is actually
> standard w3c ) 
> 
> <p>
>       {
>               (: the second param to this function is what is returned if the
> parameter 'testing' isn't there :)
>               request:request-parameter("testing", "Can't Find Param")
>               (: request:parameter-names() -> i was using this to list all the
> requests :)
>       }       
> </p>
> 
> ***************************************************************************
> 
> anyway the point is that if I use a simple form <form
> action="flowScriptXQuery" method="POST"> with a textfield. The parameter
> gets picked up by the xquery and I will see what I type into the field.
> If on the other hand I try to use flowscript nothing happens (i've tried
> quite a number of variations). 
> 
> I know that I can pass params using GET (in the url)  from flowscript
> and it wouldn't be the end of the world (IMHO a bit messy for this
> particular project) however, I've spend so long trying to figure out why
> this isn't working that it would be nice to know and understand what is
> happening to the flowscript cocoon.request s. 
> 
> I'm using Cocoon 2.1 and eXist v1.0 beta 1
> 
> Thanks in advance for any illumination on this topic that can be given
> (as I'm quite in the dark).
> Mike
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
Gruß, Jan

Attachment: pgpYeEUQiRqZb.pgp
Description: PGP signature

Reply via email to