.. _functx_change-element-ns:
========================
functx:change-element-ns
========================
Muda o namespace de elementos XML
Descrição
~~~~~~~~~
A função functx:change-element-ns muda o namespace de um ou mais elementos de
$elements para $newns. Ela não muda o namespace dos elementos descendentes; para
isso, veja a função functx:change-element-ns-deep.
.. list-table::
:widths: 40 60
:header-rows: 1
* - **Parâmetros**
- **Descrição**
* - elements:element()
- os elementos a alterar
* - newns:string()
- o novo namespace
* - prefix:string()
- o prefixo a usar para o novo namespace
Exemplos
~~~~~~~~
Os exemplos abaixo usam este documento de entrada:
.. code-block:: xml
557
xyz
.. list-table::
:widths: 50 50
:header-rows: 1
* - **XPath**
- **Resultado**
* - functx:change-element-ns($in-xml, 'http://foo','')
- 557 xyz
* - functx:change-element-ns($in-xml, 'http://foo','foo')
- 557 xyz
Veja também
~~~~~~~~~~~
.. toctree::
:titlesonly:
:glob:
* :ref:`functx_change-element-ns-deep`.
* :ref:`functx_change-element-names-deep`.