Loading TOC...


   $arg as node()?
) as xs:anyURI?


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.

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.


for $x in xdmp:directory("/myDirectory/", "1")

=> a list of URIs for all of the documents in the
   directory "/myDirectory/"

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.