Name

ex:expand-templates — Expand value templates in a document.

Synopsis

Introduction

This step expands value templates in an input document. This is analagous to what p:inline does for inline content.

Step declaration

Input portPrimarySequenceContent types
source✔  text xml html 
Output portPrimarySequenceContent types
result✔  text xml html 
Option nameTypeDefault value
variablesmap(xs:QName,item()*)?()
Declaration
1 |<p:declare-step xmlns:ex="http://exproc.org/ns/steps"
  |                xmlns:p="http://www.w3.org/ns/xproc"
  |                type="ex:expand-templates"
  |                version="3.1">
5 |   <p:input port="source" content-types="text xml html"/>
  |   <p:output port="result" content-types="text xml html"/>
  |   <p:option name="variables" as="map(xs:QName,item()*)?"/>
  |</p:declare-step>

Errors

It is a dynamic error if the XPath expression in a value template cannot be evaluated.

Description

This step expands value templates in the source document. The source document is the context item for expression evalation; the in-scope variables are the ones passed in variables.

Document properties

All document properties are preserved.