-<xqdoc:xqdoc>
-<xqdoc:module type="library">
<xqdoc:uri>http://exist-db.org/xquery/session</xqdoc:uri>
-<xqdoc:comment>
<xqdoc:description>Functions dealing with the HTTP session</xqdoc:description>
</xqdoc:comment>
</xqdoc:module>
-<xqdoc:functions>
-<xqdoc:function>
<xqdoc:name>create</xqdoc:name>
<xqdoc:signature>session:create() empty()</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Initialize an HTTP session if not already present</xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
-<xqdoc:function>
<xqdoc:name>encode-url</xqdoc:name>
<xqdoc:signature>session:encode-url($a as xs:anyURI) xs:anyURI</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Encodes the specified URL with the current HTTP session-id.</xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
-<xqdoc:function>
<xqdoc:name>get-id</xqdoc:name>
<xqdoc:signature>session:get-id() xs:string?</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Returns the ID of the current session or an empty sequence if there is no session.</xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
-<xqdoc:function>
<xqdoc:name>get-attribute</xqdoc:name>
<xqdoc:signature>session:get-attribute($a as xs:string) xs:string*</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Returns an attribute stored in the current session object or an empty sequence if the attribute cannot be found.</xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
-<xqdoc:function>
<xqdoc:name>get-attribute-names</xqdoc:name>
<xqdoc:signature>session:get-attribute-names() xs:string*</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Returns a sequence containing the names of all session attributes defined within the current HTTP session.</xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
-<xqdoc:function>
<xqdoc:name>invalidate</xqdoc:name>
<xqdoc:signature>session:invalidate() empty()</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Invalidate (remove) the current HTTP session if present</xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
-<xqdoc:function>
<xqdoc:name>set-attribute</xqdoc:name>
<xqdoc:signature>session:set-attribute($a as xs:string, $b as item()*) empty()</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Stores a value in the current session using the supplied attribute name.</xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
-<xqdoc:function>
<xqdoc:name>set-current-user</xqdoc:name>
<xqdoc:signature>session:set-current-user($a as xs:string, $b as xs:string) xs:boolean?</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Change the user identity for the current HTTP session. Subsequent XQueries in the session will run with the new user identity.</xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
-<xqdoc:function>
<xqdoc:name>exists</xqdoc:name>
<xqdoc:signature>session:exists() xs:boolean</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Returns whether a session object exists.</xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
</xqdoc:functions>
</xqdoc:xqdoc>