locate

Usage

locate [--id|:i] xpath

Description

Print canonical XPaths leading to nodes matched by a given xpath.

If flag --id (:i) is used then ID-based shortcuts are allowed in the resulting location paths. That means that if the node or some of its ancestors has an ID attribute (either xml:id or one specified in a DTD) then the corresponding segment of the canonical location path is replaced by the id() function which jumps directly to an element based on its ID.

See Also

pwd