Name

p:wrap — The standard p:wrap step.

Synopsis

The p:wrap step wraps matching nodes in the source document with a new parent element.

Input portPrimarySequenceContent types
source✔  xml html 
Output portPrimarySequenceContent types
result✔  application/xml 
Option nameTypeDefault valueRequired
matchXSLTSelectionPattern ✔ 
wrapperxs:QName ✔ 
group-adjacentXPathExpression() 
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="application/xml"/>
   |   <p:option name="wrapper" required="true" as="xs:QName"/>
 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:option xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"
   |             name="group-adjacent"
   |             as="xs:string?"
   |             e:type="XPathExpression"/>
   |</p:declare-step>
Errors
CodeDescription
err:XC0023It is a dynamic error (err:XC0023) if the pattern matches anything other than document, element, text, processing instruction, and comment nodes.

Description

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