pdx:replaceVariableByExternalFile

Replaces an array of variables by external files.

Description

Element definition

With the help of this element one may replace a single placeholder variable by a whole external document.

This element accepts the following document formats: DOCX, RTF, HTML and MHT.

This element is not compatible with the xmldocx PDF conversion plugin.

Attributes and sub-elements

variableName

The placeholder variable and the path to the corresponding external document as value.

options

key Description
firstMatch If the variable appears more than once within the Word document and firstMatch is set to true, xmldocx will only replace the first ocurrence of the variable within the Word document.
matchSource If true (default value) tries to preserve as much as possible the formatting of the inserted document.
Code samples
#Example 1

config.xml

content.xml

settings.xml

The resulting Word document looks like: