Return sequence of atomic items.
fn:data(item* $srcval) => anySimpleType*
This function takes a sequence of items as argument and returns a sequence of atomic values. If the sequence is empty, an empty sequence is returned. If the item is an atomic value, it is returned. If the item is a node, it returns the typed value of the node.
$srcval |
item value |
---|
Get the typed value of name nodes:
for $a in input()//name return ($a, data($a))
Note that in general the typed value differs from the string value that is returned by the function fn:string(). This may also apply to nodes that have the type xs:string, if the whitespace facet was used in the schema.
The following construct(s) refer to this construct: