* If any of the functions is called outside the servlet context, <code>[[XQuery Errors#BaseX Errors|basex:http]]</code> is raised.
* If a specified session id is not found, <code>[[#Errors|not-found]]</code> is raised.
* As sessions are side-effecting operations, all functions are flagged as ''non-deterministicnondeterministic''. As a result, some query optimizations will be suppressed.
=Functions=
| width='120' | '''Signature'''
|<pre>sessions:get(
$id as xs:string, $name as xs:string,
$default as item()* := ()
) as item()*</pre>
| width='120' | '''Signature'''
|<pre>sessions:set(
$id as xs:string, $name as xs:string,
$value as item()*
) as empty-sequence()</pre>
| width='120' | '''Signature'''
|<pre>sessions:delete(
$id as xs:string,
$name as xs:string
) as empty-sequence()</pre>