document-uri
The URI of a document
Description
The fn:document-uri function is basically the inverse of the fn:doc function. Where the fn:doc function accepts a URI and returns a document node, the fn:document-uri function accepts a document node and returns the absolute URI associated with it. The URI may represent the location from which it was retrieved, or simply the URI that serves as its name in an XML database.
In most cases, calling this function has the same result as calling the fn:base-uri function with the document node.
Parameters |
Description |
---|---|
arg:node() |
the node for which you want the document URI |
Examples
XPath |
Results |
---|---|
document-uri(doc(’http://www.functx.com/input/order.xml’)) |