Changes

Jump to navigation Jump to search
236 bytes removed ,  05:40, 9 September 2012
|-
| '''Examples'''
|The following RESTXQ function XQuery can e.g. be called via <code><nowiki>http://localhost:8984/restxq/setquery.xq?key=user&value=john</nowiki></code>:
<pre class="brush:xquery">
module namespace test = 'http://basex.org/examples/test';
import module namespace session = "http://basex.org/modules/session";
declare %restxq:path("/set") %restxq:query-param("key", "{$key}", "") %restxq:query-param("value", "{$value}", "") function test:update($key, $value){ session:update-attribute($key, $value), 'Attribute was set.'};
</pre>
|}
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu