
xdmp:path( $node as node(), [$include-document as xs:boolean?] ) as xs:string
Returns a string whose value corresponds to the path of the node.
| Parameters | |
|---|---|
| node | The node whose path is returned. |
| include-document |
If true, then the path is presented with a leading doc(..)/..,
otherwise the path is presented as /...
|
let $arg := <a><b><c>ccc</c></b>
<b>bbb</b></a>
return xdmp:path($arg/b[1]/c)
=> "/a/b[1]/c"