.. _functx_change-element-ns-deep:
=============================
functx:change-element-ns-deep
=============================
Changes the namespace of XML elements and its descendants
Description
~~~~~~~~~~~
The functx:change-element-ns-deep function changes the namespace of the XML
elements in $nodes to $newns. Unlike the functx:change-element-ns function, it
also changes the namespace of all their descendant elements.
.. list-table::
:widths: 40 60
:header-rows: 1
* - **Parameters**
- **Description**
* - nodes:node()
- the nodes to change
* - newns:string()
- the new namespace
* - prefix:string()
- the prefix to use for the new namespace
Examples
~~~~~~~~
.. list-table::
:widths: 50 50
:header-rows: 1
* - **XPath**
- **Results**
* - functx:change-element-ns-deep($in-xml, 'http://foo','')
- 557 xyz
* - functx:change-element-ns-deep($in-xml, 'http://foo','foo')
- 557 xyz
See Also
~~~~~~~~
.. toctree::
:titlesonly:
:glob:
* :ref:`functx_change-element-ns`.
* :ref:`functx_change-element-names-deep`.