.. _functx_path-to-node-with-pos: ============================ functx:path-to-node-with-pos ============================ A unique path to an XML node (or sequence of nodes) Description ~~~~~~~~~~~ The functx:path-to-node-with-pos function returns a path to that node, starting with the root element. Specifically, it will concatenate all the names of its ancestors, using a forward slash as a separator. If an element with that name appears more than once in a parent, a predicate is included to indicate the sequence number of that particular node. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - node:node() - the node sequence Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - functx:path-to-node-with-pos($in-xml//lName[. = 'Doe']) - authors/author[2]/lName * - functx:path-to-node-with-pos($in-xml/*[1]) - authors/author[1] Depends On ~~~~~~~~~~ * :ref:`functx_index-of-node`. See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_path-to-node`. * :ref:`functx_distinct-element-paths`.