Changes

Jump to navigation Jump to search
77 bytes removed ,  00:16, 9 September 2012
no edit summary
|-
| width='90' | '''Signatures'''
|{{Func|requestsession:id||xs:string}}
|-
| '''Summary'''
<pre class="brush:xquery">
module namespace test = 'http://basex.org/examples/test';
import module namespace request session = "http://exquerybasex.org/nsmodules/restxq/requestsession";
declare
%restxq:path("/id")
function test:id()
{
'ID: ' || requestsession:session-id()
};
</pre>
|-
| width='90' | '''Signatures'''
|{{Func|requestsession:attribute|$key as xs:string|xs:string?}}
|-
| '''Summary'''
<pre class="brush:xquery">
module namespace test = 'http://basex.org/examples/test';
import module namespace request session = "http://exquerybasex.org/nsmodules/restxq/requestsession";
declare
%restxq:path("/get")
%restxq:query-param("key", "{$key}", "")
%restxq:request("{$req}")
function test:get($req, $key)
{
'Value of ' || $key || ': ' || requestsession:get-attribute($req, $key)
};
</pre>
|-
| width='90' | '''Signatures'''
|{{Func|requestsession:update-attribute|$key as xs:string, $value as xs:string|empty-sequence()}}
|-
| '''Summary'''
<pre class="brush:xquery">
module namespace test = 'http://basex.org/examples/test';
import module namespace request session = "http://exquerybasex.org/nsmodules/restxq/requestsession";
declare
%restxq:path("/set")
%restxq:query-param("key", "{$key}", "")
%restxq:query-param("value", "{$value}", "")
%restxq:request("{$req}")
function test:set($req, $key, $value)
{
requestsession:setupdate-attribute($req, $key, $value),
'Attribute was set.'
};
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu