cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Rowse <>
Subject Simple newbie question -> is there a reason I can 't POST information from a flowscript to and eXist XQuery
Date Thu, 30 Jun 2005 07:59:03 GMT
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:match pattern="testFlowRequest">
		<map:call function="testRequest"/>
	<map:match pattern="flowScriptXQuery">
		<map:generate type="xquery" src="xquery/testReq.xql"/>
		<map:serialize type="xhtml"/>

flowscript -> pretty simple eh? :)

function testRequest(){
	var testObj = { "test" : "this worked" };
	cocoon.request.setAttribute("testing", "blah");
	cocoon.sendPage("testRequest" : testObj);

xquery using eXist (I think that the request: names space is actually
standard w3c ) 

		(: 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 :)


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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message