XSLTransformer

Not available in Community Designer

Short Description
Ports
XSLTransformer Attributes
Details
Best Practices
See also

Short Description

XSLTransformer transforms input data records using an XSL transformation (XSLT 1.0 and XSLT 2.0 are supported).

Component Same input metadata Sorted inputs Inputs Outputs Java CTL Auto-propagated metadata
XSLTransformer-
no
11
no
no
no

Icon

Ports

Port typeNumberRequiredDescriptionMetadata
Input0
no
For input data recordsAny1
Output0
no
For transformed data recordsAny2

XSLTransformer Attributes

AttributeReqDescriptionPossible values
Basic
XSLT file [1] External file defining the XSL transformation. 
XSLT[1]XSL transformation defined in the graph. 
Mapping [2] Sequence of individual mappings for output fields separated from each other by semicolon. Each individual mapping has the following form: $outputField:=transform($inputField) (if inputField should be transformed according to the XSL transformation) or $outputField:=$inputField (if inputField should not be transformed). 
XML input file or field [2] [3] URL of file, dictionary or field serving as input. 
XML output file or field [2] [3] URL of file, dictionary or field serving as output. 
Advanced
Create directories If set to true, non-existing directories in the XML output file or field attribute path are created.false (default) | true
Output charset Character encoding of the output.UTF-8 (default) | other encoding

[1]  One of these attributes must be set. If both are set, XSLT file has higher priority.

[2]  One of these attributes must be set. If more are set, Mapping has the highest priority.

[3]  Either both or neither of them must be set. They are ignored if Mapping is defined.

Details

XSLTransformer component does XSL transformation of input and writes the transformation result to the output. The input and output can be specified by file URL, dictionary or field. The XSL transformation can be loaded from an external file or can be defined in the component.

Mapping

Mapping can be defined using the following wizard.

XSLT Mapping

Figure 55.6. XSLT Mapping


Assign the input fields from the Input fields pane on the left to the output fields by dragging and dropping them in the Input field column of the right pane. Select which of them should be transformed by setting the Transform data option to true. By default, fields are not transformed.

The resulting Mapping can look like this:

An Example of Mapping

Figure 55.7. An Example of Mapping


Remember that you must set either the Mapping attribute, or a pair of the following two attributes: XML input file or field and XML output file or field. These define input and output file, dictionary or field. If you set Mapping, these two other attributes are ignored even if they are set.

Best Practices

We recommend users to explicitly specify Output charset.

See also

Common Properties of Components
Specific Attribute Types
Common Properties of Transformers
Transformers Comparison