The <source> element is a child of the <transform> step. This element specifies an external file on the target host that contains the transformation to be applied to the input file. At most one <source> element can appear as a child of a particular <transform> element. You cannot use the <source> element in conjunction with other child elements.
Configuration generation is not performed on the specified source file as part of the <transform> step. However, the specified source file can be a config-type resource file that is deployed as part of a component installation. In such as case, substitution variables that are contained in the source file would have been substituted when the file was deployed.
The <source> element has the following attributes:
type – A required element that is the type of transformation that is contained in the specified file. The following values are permitted:
PERL – A Perl-like transformation that is similar to that of the <subst> element. In this case, the specified file should have format similar to the following format:
<?xml version='1.0'?> <transform> <subst match="127\.0\.0\.(\d+)" replace="10.10.0.$1"/> </transform> |
Perl-type external transformation files can contain any number of <subst> elements.
XSLT – An XSLT transformation. In this case, the specified file contains a standard XSLT Version 1.0 transformation as defined by the name space http://www.w3.org/1999/XSL/Transform. Unlike inline transformations, which only permit the XSLT <stylesheet> element, XSLT transformations that are contained in external source files can include any valid top-level XSLT transformation element. Such elements are <stylesheet>, <transform>, and simplified XSLT syntax. The simplified XSLT syntax is described in Section 2.3 of the XSLT specification.
name – A required attribute that is the name of the file on the target host that contains the transformation. The contents of the file must correspond to the type defined by the type attribute. The name cannot include zip archives as directory elements. This attribute can reference simple substitution variables.