fn:path
This function takes as input a node (defaulting to the context node), and returns an XPath expression defining a path to that node from the root of its containing tree (which must be a document node). The path will use expanded QNames so that it is not sensitive to the namespace context.
path() ➔ xs:string
There are no arguments | |||
Result | xs:string |
path($arg as node()?) ➔ xs:string?
Arguments | |||
| $arg | node()? | The node whose path is to be determined |
Result | xs:string? |
Namespace
http://www.w3.org/2005/xpath-functions
Links to W3C specifications
XPath 3.1 Functions and Operators
Saxon availability
Available in XPath 3.0, XSLT 3.0, XQuery 3.0, and later versions. From Saxon 9.6, available in all editions.
Notes on the Saxon implementation
Fully available since Saxon 9.6. Available since Saxon 9.4 provided XPath 3.0 is enabled.
Replaces the extension function saxon:path
which is retained for the time
being.