Changes

Jump to navigation Jump to search
135 bytes removed ,  06:34, 9 September 2012
|}
==session:attributeskeys==
{| width='100%'
|-
| width='90' | '''Signatures'''
|{{Func|session:attributeskeys||xs:string*}}
|-
| '''Summary'''
|Returns the names of all attributes variables bound to the current session.
|-
| '''Examples'''
|Running the server-side XQuery file {{Code|attributeskeys.xq}} via <code><nowiki>http://localhost:8984/attributeskeys.xq</nowiki></code>:
<pre class="brush:xquery">
import module namespace session = "http://basex.org/modules/session";
session:attributeskeys() ! element attribute variable { . }
</pre>
|}
==session:attributeget==
{| width='100%'
|-
| width='90' | '''Signatures'''
|{{Func|session:attributeget|$key as xs:string|xs:string?}}<br/>{{Func|session:attributeget|$key as xs:string, $default as xs:string|xs:string}}
|-
| '''Summary'''
|Returns the value of an attribute a variable bound to the current session. If the attribute variable does not exist, an empty sequence or the optionally specified default value is returned instead.
|-
| '''Errors'''
|{{Error|BXSE0002|#Errors}} the value of a session attribute variable could not be retrieved.
|-
| '''Examples'''
<pre class="brush:xquery">
import module namespace session = "http://basex.org/modules/session";
'Value of ' || $key || ': ' || session:attributeget($key)
</pre>
|}
==session:update-attributeset==
{| width='100%'
|-
| width='90' | '''Signatures'''
|{{Func|session:update-attributeset|$key as xs:string, $value as xs:string|empty-sequence()}}
|-
| '''Summary'''
|Assigns a value to a session attributevariable.
|-
| '''Errors'''
|{{Error|BXSE0001|#Errors}} a function item was specified as value of a session attributevariable.
|-
| '''Examples'''
<pre class="brush:xquery">
import module namespace session = "http://basex.org/modules/session";
session:update-attributeset($key, $value), 'Attribute Variable was set.'
</pre>
|}
==session:delete-attribute==
{| width='100%'
|-
| width='90' | '''Signatures'''
|{{Func|session:delete-attribute|$key as xs:string|empty-sequence()}}
|-
| '''Summary'''
|Deletes a session attributevariable.
|-
| '''Errors'''
|{{Error|BXSE0001|#Errors}} a function item was specified as value of a session attributevariable.
|-
| '''Examples'''
<pre class="brush:xquery">
import module namespace session = "http://basex.org/modules/session";
session:delete-attribute($key), 'Attribute Variable was deleted.'
</pre>
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu