Using XSL Transform

Use the XSLTransform node to transform an XML message to another form of message, according to the rules provided by an XSL (Extensible Stylesheet Language) style sheet.

About this task

Use the XSLTransform node to transform an input XML message into another format using XSLT style sheets and to set the message domain, message model, message type, and message format for the generated message. It is imperative that the data can be parsed into a XML message. The style sheet, using the rules that are defined within it, can perform the following actions:
  • Sort the data
  • Select data elements to include or exclude based on some criteria
  • Transform the data into another format

The XL TXE-J transformation engine, provided by the Java™ JRE , is used as the underlying transformation engine; see XL TXE-J reference information. For more information about XML Transformations, the W3C specification of the syntax, and semantics of the XSL Transformations language for transforming XML documents into other XML documents, see W3C XSL Transformations.

You can deploy style sheets and XML files to integration node integration servers, to help with style sheet and XML file maintenance.

You can specify the location of the style sheet to apply to this transformation in three ways:

  • Use the content of the XML data within the message itself to transform the message according to a style sheet that the message itself defines.
  • Set a value in the LocalEnvironment folder. You must set this value in a node that precedes the XSLTransform node (for example, a Compute node). You can therefore use various inputs to determine which style sheet to use for this message, such as the content of the message data, or a value in a database.
  • Use node properties to ensure that the transformation that is defined by this single style sheet is applied to every message that is processed by this node.

An XSLT (Extensible Stylesheet Language for Transformations) compiler is used for the transformation if the style sheet is not embedded within the message, and the node cache level (node property Stylesheet Cache Level) is greater than zero. If the XSLT is cached, the performance is improved because the XSLT is not parsed every time it is used.

If the prologue of the input message body contains an XML encoding declaration, the XSLTransform node ignores the encoding, and always uses the CodedCharSetId in the message property folder to decode the message.

The XSLT capability that is provided by the XSLTransform node requires XML processing APIs that are included in Xalan-Java and Xerces JAR files. The XSLTransform node provides Xalan-Java and Xerces JAR files that work correctly with the node. The Java JRE also includes Xalan-Java and Xerces JAR files, but you might experience unpredictable results when these Java XML processing methods are invoked by using an external Java method from a style sheet. Therefore, the calling of Java methods from a style sheet that directly or indirectly reference Java JRE XML processing methods is unsupported.

To find out more about the XSLTransform node and how to configure it, refer to the following topics: