Hi Pradeep,
The way you describe it, it should show query1.xqy in the URL display. I guess
it depends on what your various xqy files are *exactly* doing. Here is a
simple app where query3.xqy uses query2.xqy as its action and does an update
and a redirect to query1.xqy, and it shows query1.xqy in the URL after the
redirect. Note that if you want to make sure the update done in query2.xqy
shows up in the redirected query1.xqy, you should do the update in a separate
transaction as the redirect.
query1.xqy:
xquery version "1.0-ml";
xdmp:set-response-content-type("text/html"),
<html>
<body>
<p>this is query1.xqy</p>
<p>The contents of /test.xml are: <br />
{xdmp:quote(fn:doc("/test.xml")/*)}</p>
<p><a href="query2.xqy">go back</a></p>
</body>
</html>
query2.xqy:
xquery version "1.0-ml";
xdmp:set-response-content-type("text/html"),
<html>
<body>
<form action="query3.xqy" method="get">
<input name="field" type="text"/>
<input type="submit"/>
</form>
</body>
</html>
query3.xqy:
xquery version "1.0-ml";
let $field := xdmp:get-request-field("field")
return
xdmp:document-insert("/test.xml", <test>{$field}</test>);
xdmp:redirect-response("query1.xqy")
-Danny
From: [email protected]
[mailto:[email protected]] On Behalf Of Pradeep Maddireddy
Sent: Friday, July 02, 2010 9:55 AM
To: General Mark Logic Developer Discussion
Subject: [MarkLogic Dev General] HTTp redirect-response
Hi..!
I am having three xqy files (which generate html pages)
1.query1.xqy
2.query2.xqy ( XFORMS page)
3.query3.xqy
Flow query1.xqy to query2.xqy to query3.xqy
On hitting the submit button on query2.xqy the action(update) to be performed
is in query3.xqy and then redirect to query1.xqy.
I am using xdmp:redirect-response to goback to query1.xqy. I see query1.xqy
page being displayed but in the url it still shows query2.xqy.
Is there anything I am missing.
Thanks
Pradeep Maddireddy
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general