.. _functx_is-descendant: ==================== functx:is-descendant ==================== Whether an XML node is a descendant of another node Description ~~~~~~~~~~~ The functx:is-descendant function returns a boolean value indicating whether $node1 is a descendant 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-descendant($in-xml//author[1]/fName, $in-xml//author[1]) - true * - functx:is-descendant($in-xml//author[1], $in-xml//author[1]/fName) - false * - functx:is-descendant($in-xml//author[1]/fName/text(), $in-xml//author[1]/fName) - true * - functx:is-descendant($in-xml//author[1], $in-xml//author[2]) - false See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_is-ancestor`.