.. _functx_remove-attributes-deep:
=============================
functx:remove-attributes-deep
=============================
Removes attributes from an XML fragment, based on name
Description
~~~~~~~~~~~
The functx:remove-attributes-deep function removes attributes from a sequence of
elements and all of their descendants. The $names argument is a sequence of
strings that represent attribute names to remove. Prefixes can (and must) be
used in the $names values for attributes that are prefixed in the input
documents. You can also specify wildcard values "*", "*:" and ":*" in the second
argument. See the description for functx:name-test for details.
.. list-table::
:widths: 40 60
:header-rows: 1
* - **Parameters**
- **Description**
* - nodes:node()
- the root(s) to start from
* - names:string()
- the names of the attributes to remove, or * for all attributes
Examples
~~~~~~~~
.. list-table::
:widths: 50 50
:header-rows: 1
* - **XPath**
- **Results**
* - functx:remove-attributes-deep($in-xml-1, ('attr1','attr2'))
- abc
* - functx:remove-attributes-deep($in-xml-1, ('attr1','attr3'))
- abc
* - functx:remove-attributes-deep($in-xml-2, 'a:attr1')
- abc
Depends On
~~~~~~~~~~
* :ref:`functx_name-test`.
See Also
~~~~~~~~
.. toctree::
:titlesonly:
:glob:
* :ref:`functx_remove-attributes`.
* :ref:`functx_add-attributes`.