.. _functx_distinct-deep:
====================
functx:distinct-deep
====================
The XML nodes with distinct values, taking into account attributes and
descendants
Description
~~~~~~~~~~~
The functx:distinct-deep function compares nodes based on whether they are
deep-equal, then returns only the first node with each distinct value. Two nodes
are deep-equal if they have the same attributes with the same values, and all
the same children, in the same order, that are themselves deep-equal.
.. list-table::
:widths: 40 60
:header-rows: 1
* - **Parameters**
- **Description**
* - nodes:node()
- the sequence of nodes to test
Examples
~~~~~~~~
.. list-table::
:widths: 50 50
:header-rows: 1
* - **XPath**
- **Results**
* - functx:distinct-deep($in-xml//author)
- Kate Jones Kate Doe
* - functx:distinct-deep($in-xml//lName)
- Jones Doe
* - functx:distinct-deep($in-xml//fName)
- Kate
Depends On
~~~~~~~~~~
* :ref:`functx_is-node-in-sequence-deep-equal`.
See Also
~~~~~~~~
.. toctree::
:titlesonly:
:glob:
* :ref:`functx_is-node-in-sequence-deep-equal`.
* :ref:`functx_distinct-nodes`.
* :ref:`distinct-values`.