Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

fn:string

Return argument value as a string.


Syntax

fn:string(item $value) => string

Top of page

Description

This accessor function returns the value of $value represented as a string. If $value is a non-empty sequence, a type exception is raised. If $value is an empty sequence or an empty string, a string of length zero is returned as result. If $value is a node, the string value of the node is returned. If $value is an atomic value, it is converted to a string and returned.

Note that the value returned by this function, when applied to a node, may differ from the typed value, even if the node is specified in the schema as being of type xs:string. To access the typed value, use the function fn:data.

Top of page

Argument

$value

one of an atomic value, a string or the string value of a node

Top of page

Examples

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:

Top of page