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.
This description is © Copyright 2007, Priscilla Walmsley. It is excerpted from the book XQuery by Priscilla Walmsley, O'Reilly, 2007. For a complete explanation of this function, please refer to Appendix A of the book. Arguments and Return TypeName | Type | Description |
$arg |
node()? |
the node for which you want the document URI |
return value |
xs:anyURI? |
ExamplesXPath Example | Results |
---|
document-uri(doc(
'https://www.datypic.com/functx./input/order.xml')) |
http://www.functx.com/input/order.xml |
See AlsoHistory |
Recommended Reading:
|