Changes

Jump to navigation Jump to search
419 bytes removed ,  20:18, 11 November 2019
| '''Examples'''
|
* The query <code><nowiki>web:redirect('/a/b')</nowiki></code> returns the following result (which will be interpreted as redirection if RESTXQ is used):
<pre class="brush:xml">
<rest:response xmlns:rest="http://exquery.org/ns/restxq">
</http:response>
</rest:response>
</pre>
* The first RESTXQ function creates an initial database, and redirects to a second function that will access this database:
<pre class="brush:xquery">
declare %updating %rest:path('/app/init') function local:init() {
db:create('app', <root/>, 'root.xml'),
db:output(web:redirect('/app/main'))
};
 
declare %rest:path('/app/main') function local:update() {
'Stored documents: ' || count(db:open('app'))
};
</pre>
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu