.. _functx_is-descendant: ==================== functx:is-descendant ==================== Se um nó XML é descendente de outro nó Descrição ~~~~~~~~~ A função functx:is-descendant devolve um valor booleano que diz se $node1 é descendente de $node2. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parâmetros** - **Descrição** * - node1:node() - o primeiro nó * - node2:node() - o segundo nó Exemplos ~~~~~~~~ Os exemplos abaixo usam este documento de entrada: .. code-block:: xml Kate Jones John Doe .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Resultado** * - 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 Veja também ~~~~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_is-ancestor`.