Replacement Template

Using the ReplacementTemplate options means that Ensconce will read one file, apply the substitution to it but save it under a different file name.

This means you have the ability to read a single file, but save that file multiple times with slightly different content.

Example

Base File


<root>
    <lookupValue></lookupValue>
</root>

Substitution


<Files>
    <File Filename="PATH\File1.xml">
        <ReplacementTemplate>PATH\BaseFile.xml</ReplacementTemplate>
        <Changes>
            <Change type="ChangeValue" xPath="/root/lookupValue" value="File1" />
        </Changes>
    </File>
    <File Filename="PATH\File2.xml">
        <ReplacementTemplate>PATH\BaseFile.xml</ReplacementTemplate>
        <Changes>
            <Change type="ChangeValue" xPath="/root/lookupValue" value="File2" />
        </Changes>
    </File>
</Files>

Output (File1)


<root>
    <lookupValue>File1</lookupValue>
</root>

Output (File2)


<root>
    <lookupValue>File2</lookupValue>
</root>