|
|
fn:document-uri(
|
|
$arg as node()?
|
| ) as xs:anyURI? |
|
 |
Summary:
Returns the value of the document-uri property for the specified node.
If the node is a document node, then the value returned is the URI of the
document. If the node is not a document node, then
fn:document-uri returns the empty sequence.
|
Parameters:
$arg
:
The node whose document-uri is to be returned.
|
|
Usage Notes:
fn:document-uri will only return the URI of a document
when a document node is passed into it. If you want to return the URI
of a node that is not a document node, but has a document node ancestor,
use fn:base-uri or
xdmp:node-uri.
|
Example:
for $x in xdmp:directory("/myDirectory/", "1")
return
fn:document-uri($x)
=> a list of URIs for all of the documents in the
directory "/myDirectory/"
|
|
|
|
fn:string(
|
|
[$arg as item()?]
|
| ) as xs:string? |
|
 |
Summary:
Returns the value of $arg represented as an xs:string. If no
argument is supplied, this function returns the string value of the
context item (.).
|
Parameters:
$arg
(optional):
The item to be rendered as a string.
|
|
Usage Notes:
If no argument is supplied and the context item is undefined, an error is
raised.
If $arg is the empty sequence, the zero-length string is returned.
If $arg is a node, the function returns the string-value of the node, as
obtained using the dm:string-value accessor.
If $arg is an atomic value, then the function returns the same string as is
returned by the expression: $arg cast as xs:string
|
Example:
let $x := <hello>hello<goodbye>goodbye</goodbye></hello>
return
fn:string($x)
=> hellogoodbye
|
|
|