.. _functx_is-ancestor: ================== functx:is-ancestor ================== Whether an XML node is an ancestor of another node Description ~~~~~~~~~~~ The functx:is-ancestor function returns a boolean value indicating whether $node1 is an ancestor of $node2. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - node1:node() - the first node * - node2:node() - the second node Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - functx:is-ancestor($in-xml//author[1], $in-xml//author[1]/fName) - true * - functx:is-ancestor($in-xml//author[1]/fName, $in-xml//author[1]) - false * - functx:is-ancestor($in-xml//author[1]/fName, $in-xml//author[1]/fName/text()) - true * - functx:is-ancestor($in-xml//author[1], $in-xml//author[2]) - false See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_is-descendant`.