fn:base-uri

fn:base-uri(
   [$arg as node()?]
) as xs:anyURI?

Summary

Returns the value of the base-uri property for the specified node. If the node is part of a document and does not have a base-uri attribute explicitly set, fn:base-uri typically returns the URI of the document in which the node resides.

Parameters
arg The node whose base-uri is to be returned.

Example

for $x in xdmp:directory("/myDirectory/", "1")
return
base-uri($x)

=> a list of URIs for all of the documents in the
   directory "/myDirectory/"
Powered by MarkLogic Server | Terms of Use | Privacy Policy