Name

p:string-replace — The standard p:string-replace step.

Synopsis

The p:string-replace step matches nodes in the document provided on the source port and replaces them with the string result of evaluating an XPath expression.

Input portPrimarySequenceContent types
source✔  xml html 
Output portPrimarySequenceContent types
result✔  text xml html 
Option nameTypeRequired
matchXSLTSelectionPattern✔ 
replaceXPathExpression✔ 
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="text xml html"/>
   |   <p:option xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"
 5 |             name="match"
   |             required="true"
   |             as="xs:string"
   |             e:type="XSLTSelectionPattern"/>
   |   <p:option xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"
10 |             name="replace"
   |             required="true"
   |             as="xs:string"
   |             e:type="XPathExpression"/>
   |</p:declare-step>
Errors
CodeDescription

Description

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