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
path($arg as node()?) ➔ xs:string?
The node whose path is to be determined
Links to W3C specifications
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