Home
Download
Wiki
Demo
Open Source Native XML Database
About Us
Who we are
Acknowledgements
Documentation
Quick Start
Function Library
Extension Modules
Main Documentation
Feature Sheet
XQuery Wikibook
Examples
XQuery Sandbox
XML Acronyms
Bibliographic
All Examples
Community
Mailing List/IRC
Development
Javadocs
ChangeLog
Bug Tracker
Subversion
Submit Patches
Administration
Admin
Server Status
Webstart Client
A RESTful browser for eXist Java-Based Function Modules
Modules
>
session
session
http://exist-db.org/xquery/session
A module for dealing with the HTTP session.
clear
session:clear() empty()
Removes all attributes from the current HTTP session. Does NOT invalidate the session.
create
session:create() empty()
Initialize an HTTP session if not already present
encode-url
session:encode-url($url as xs:anyURI) xs:anyURI
Encodes the specified URL with the current HTTP session-id.
$url
The URL to encode
Returns the encoded URL
exists
session:exists() xs:boolean
Returns whether a session object exists.
Returns true if the session object exists
get-attribute
session:get-attribute($name as xs:string) xs:string*
Returns an attribute stored in the current session object or an empty sequence if the attribute cannot be found.
$name
The session attribute name
Returns the attribute value
get-attribute-names
session:get-attribute-names() xs:string*
Returns a sequence containing the names of all session attributes defined within the current HTTP session.
Returns the list of attribute names
get-id
session:get-id() xs:string?
Returns the ID of the current session or an empty sequence if there is no session.
Returns the session ID
invalidate
session:invalidate() empty()
Invalidate (remove) the current HTTP session if present
remove-attribute
session:remove-attribute($name as xs:string) empty()
Removes the attribute with the supplied name from the current session
$name
The attribute name
set-attribute
session:set-attribute($name as xs:string, $value as item()*) empty()
Stores a value in the current session using the supplied attribute name. If no session exists, then one will be created.
$name
The attribute name
$value
The value to be stored in the session by the attribute name
set-current-user
session:set-current-user($user-name as xs:string, $password as xs:string) xs:boolean?
Change the user identity for the current HTTP session. Subsequent XQueries in the session will run with the new user identity.
$user-name
The user name
$password
The password
Returns true if the user name and password represent a valid user
Return to list of all modules