Name

p:rename — The standard p:rename step.

Synopsis

The p:rename step renames elements, attributes, or processing-instruction targets in a document.

Input portPrimarySequenceContent types
source✔  xml html 
Output portPrimarySequenceContent types
result✔  xml html 
Option nameTypeDefault valueRequired
new-namexs:QName ✔ 
matchXSLTSelectionPattern'/*' 
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 xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"
 5 |             name="match"
   |             as="xs:string"
   |             select="'/*'"
   |             e:type="XSLTSelectionPattern"/>
   |   <p:option name="new-name" required="true" as="xs:QName"/>
10 |</p:declare-step>
Errors
CodeDescription
err:XC0013It is a dynamic error (err:XC0013) if the pattern matches a processing instruction and the new name has a non-null namespace.
err:XC0023It is a dynamic error (err:XC0023) if the pattern matches anything other than element, attribute, or processing instruction nodes, or if it matches more than one attribute on a single element.

Description

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