Name

p:replace — The standard p:replace step.

Synopsis

The p:replace step replaces matching nodes in its primary input with the top-level node(s) of the replacement port's document.

Input portPrimarySequenceContent types
source✔  xml html 
replacement  text xml html 
Output portPrimarySequenceContent types
result✔  text xml html 
Option nameTypeRequired
matchXSLTSelectionPattern✔ 
Declaration
 1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
   |   <p:input port="source" primary="true" content-types="xml html"/>
   |   <p:input port="replacement" content-types="text xml html"/>
   |   <p:output port="result" content-types="text xml html"/>
 5 |   <p:option xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"
   |             name="match"
   |             required="true"
   |             as="xs:string"
   |             e:type="XSLTSelectionPattern"/>
10 |</p:declare-step>
Errors
CodeDescription
err:XC0023It is a dynamic error (err:XC0023) if that pattern matches an attribute or a namespace nodes.

Description

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