Name

p:namespace-rename — The standard p:namespace-rename step.

Synopsis

The p:namespace-rename step renames any namespace declaration or use of a namespace in a document to a new IRI value.

Input portPrimarySequenceContent types
source✔  xml html 
Output portPrimarySequenceContent types
result✔  xml html 
Option nameTypeValuesDefault value
apply-toxs:string('all','elements','attributes') 'all'
fromxs:anyURI? ()
toxs:anyURI? ()
Declaration
1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
  |   <p:input port="source" content-types="xml html"/>
  |   <p:output port="result" content-types="xml html"/>
  |   <p:option name="from" as="xs:anyURI?"/>
5 |   <p:option name="to" as="xs:anyURI?"/>
  |   <p:option name="apply-to"
  |             select="'all'"
  |             values="('all','elements','attributes')"/>
  |</p:declare-step>
Errors
CodeDescription
err:XC0014It is a dynamic error (err:XC0014) if the XML namespace (http://www.w3.org/XML/1998/namespace) or the XMLNS namespace (http://www.w3.org/2000/xmlns/) is the value of either the from option or the to option.
err:XC0092It is a dynamic error (err:XC0092) if as a consequence of changing or removing the namespace of an attribute the attribute's name is not unique on the respective element.

Description

The p:namespace-rename step is defined in the XProc 3.0: Standard Step Library. It is also described on XProcRef.org.