.. _functx_dynamic-path: =================== functx:dynamic-path =================== Dynamically evaluates a simple XPath path Description ~~~~~~~~~~~ The functx:dynamic-path function dynamically evaluates a simple path expression. The function only supports element names and attribute names preceded by @, separated by single slashes. The names can optionally be prefixed, but they must use the same prefix that is used in the input document. It does not support predicates, other axes or other node kinds. Note that most processors have an extension function that evaluates path expressions dynamically in a much more complete way. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - parent:node() - the root to start from * - path:string() - the path expression Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - functx:dynamic-path($in-xml,'author/first') - Kate John * - name(functx:dynamic-path($in-xml,'author/@test')) - test * - functx:dynamic-path($in-xml,'author') - Kate Jones John Doe * - functx:dynamic-path($in-xml,'author/a:last') - Doe Depends On ~~~~~~~~~~ * :ref:`functx_substring-before-if-contains`. * :ref:`functx_name-test`. See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_path-to-node`.