Changes

Jump to navigation Jump to search
212 bytes removed ,  12:49, 8 July 2020
no edit summary
* The module will be available if the {{Code|basex-api}} library is found in the classpath. This is the case if you use one of the complete distributions of BaseX (zip, exe, war).
* All functions and errors are assigned of the <code><nowiki>http://basex.org/modules/sessions</nowiki></code> namespace. The module must be imported in the query prolog:<pre class="brush:xquery">import module namespace sessions = "http://basex.org/modules/sessions";...</pre>* In this document, the namespace which is statically bound to the {{Code|sessions}} prefix.
* 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.
|-
| '''Summary'''
|Returns the names of all variables attributes bound to the session specified by {{Mono|$id}}.
|}
| '''Summary'''
|Returns the value of an attribute with the specified {{Code|$name}} from the session with the specified {{Mono|$id}}. If the attribute is unknown, an empty sequence or the optionally specified {{Code|$default}} value will be returned instead.
|-
| '''Errors'''
|{{Error|get|#Errors}} the value of an attribute could not be retrieved.
|}
! width="110"|Code
|Description
|-
|{{Code|get}}
|The stored attribute is no XQuery value.
|-
|{{Code|set}}
|The supplied value cannot be materializedstored.
|-
|{{Code|not-found}}
|The specified session was is not foundavailable.
|}
=Changelog=
 
;Version 9.3
* Updated: [[#sessions:get|sessions:get]]: Values that have no XQuery type will be returned as strings.
;Version 9.0
 
* Updated: error codes updated; errors now use the module namespace
;Version 8.4
 
* Updated: Allow sequences as session values.
This module was introduced with Version 7.5.
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu