XSLT
Overview
This Snap reads the binary data and applies the XSLT transformation rules and writes out the resulting documents. This Snap supports 1.0, 2.0 standards.

Transform-type Snap
Works in Ultra Tasks
Prerequisites
The input binary data must use UTF-8 encoding. If non-UTF-8 encoded data or a special character is passed, it results in an error: "Error view with behavior continue received a new type of error." Refer to the Troubleshooting section below for steps to resolve this error.
Snap views
View | Description | Examples of upstream and downstream Snaps |
---|---|---|
Input | This Snap has exactly one binary input view, where it accepts binary data. | |
Output | This Snap has exactly one binary output view and produces binary datathat was produced by the XSLT Transformer. | |
Error |
Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:
Learn more about Error handling in Pipelines. |
Snap settings
- Expression icon (
): Allows using pipeline parameters to set field values dynamically (if enabled). SnapLogic Expressions are not supported. If disabled, you can provide a static value.
- SnapGPT (
): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
- Suggestion icon (
): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
- Upload
: Uploads files. Learn more.
Field / Field set | Type | Description | ||||
---|---|---|---|---|---|---|
Label | String | Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline. Default value: XSLT Example: XSLT |
||||
Schema | String/Expression | Schema of the incoming data provided as XSD. Example: sldb:///my_schema/foo.xsd |
||||
Validate Input | Checkbox |
Specifies the incoming data to be validated against the provided XSD schema definition in Inbound Schema property. Note: If you enter an Inbound schema, then you must select Validate
XML and Match data types properties to derive the output as per the
defined schema.
Important: Java 8 throws an error if the
maxOccurs
value in your XSD file is greater than 5000. To overcome this error, set
maxOccurs to unbounded . If you cannot modify
the XSD, perform the following:
Default status: Deselected |
||||
XSLT | String/Expression |
Required. Transforms the incoming XML document based on the XSLT Transformation rules. Important: Pass values dynamically
You can also dynamically pass parameter values to the Snap instead of passing an XML input, by configuring the intended parameter values in an upstream Mapper Snap. Ensure that the intended parameters are defined in the template's header. For example, consider the following XML:
To pass a dynamic value for the parameter title, you would
include this parameter in the XML stylesheet template (XSLT) as follows:
Example: sldb:///my_xslt/converter.xslt |
||||
Format as canonical XML | Checkbox | Select to produce a canonical XML output. The canonical form of an XML output is an XML representation that excludes the XML prolog and includes the start and end tag for all the XML elements. Default status: Deselected |
||||
Snap execution | Dropdown list |
Choose one of the three modes in
which the Snap executes. Available options are:
Default value: Execute Only Example: Validate and Execute |
Troubleshooting
Error Message | Reason | Resolution |
---|---|---|
Error view with behavior continue received a new type of error. | If data with coding other than UTF-8 or a special character is passed to the XSLT Snap, an error is displayed during Pipeline execution. This happens because the XSLT Snap is configured to accept UTF-8 encoded data only. |
Add the Transcoder Snap before the XSLT Snap. In the Transcoder Snap Settings, specify your current character set in the Input character-set field and UTF-8 in the Output character-set field. |