4.4.4.11. Drag and Drop transformation properties

The following properties are available :

Mapping definition

This file is the definition of the visual mapping. You normally edit it via the mapping tree editor.

Xslt

This file is the xslt transformation that will be applied on the internal xml representation of your incoming message to transform it into the outgoing message. It is generated from the mapping definition file.

You can only edit this file via the mapping definition file. If you directly want to write an advanced xslt transformation, you have to use an xslt transformation instead of a visual transformation.

Xslt includes

Xslt files that will be included in the generated xslt. It allows you to define some custom xslt functions, and use them in the mapping. The uploaded file must contain all of your functions. It must looks like :

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:bfn="http://xmlns.babelway.com/2007/function"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:common="http://exslt.org/common"
xmlns:math="http://exslt.org/math"
xmlns:sets="http://exslt.org/sets"
xmlns:dates-and-times="http://exslt.org/dates-and-times"
xmlns:random="http://exslt.org/random"
xmlns:saxon="http://saxon.sf.net/"
>

<xsl:function name="bfn:xml-parse" >
<xsl:param name="xmlString"/>
<xsl:sequence select="saxon:parse($xmlString)"/>
</xsl:function>

</xsl:stylesheet>

Transformation mode

Allows you to use special transformation modes. The available modes are :

  • Normal : transformation reads content and metadata of the incoming message, and its result will affect content and metadata of the outgoing message.

  • Metadata only for outgoing message : only the metadata of the outgoing message will be updated. The content of the outgoing message will be the same as the input. This mode can be used in special situations where the transformation must only generate some additional metadata.

  • Metadata only for incoming message : only the metadata of the incoming message will be used, not its content. This mode can be used in special situations where the transformation only operated on the metadata of the incoming message. A dummy message in will be used instead of the incoming content.

  • Metadata only : the transformation only operates on the metadata of the incoming message, and can only update metadata of the outgoing message. Content will not be updated by the transform.

Note: If you want to extract some information from the input message and then save the extracted information in a user defined metadata, you must select the correct "Transformation mode" depending on your case.

Below is an example to show what will happen for the output message when the input message is processed by a channel whose "Message In" is of type "XML" and the "Message Out" is of type "Note Defined".

In this case the transformation will extract the status of the message from the input message and save it in a user defined metadata.

Status" field from the "Message In" in the transformation is mapped to "MessageStatus" user defined metadata in the "Message Out". Moreover, the "Transformation mode" is "Normal".

Test Channel

Figure 4.201. Test Channel


Now when the message will be processed by this channel it will be empty, as shown below:

Empty Output Message

Figure 4.202. Empty Output Message


To fix this issue, you will need to change the "Transformation mode" to be "Metadata only for outgoing message (does not change content)." to make sure that the output message is not empty.

Transformation Mode

Figure 4.203. Transformation Mode


Now when the message will be processed by this channel it will be generated properly, as shown below:

Output Message

Figure 4.204. Output Message