Complex expressions

A function parameter can be defined as a complex expression of XSLT functions. This returns the same type as the edited parameter.

To edit a function with a complex expression:

  1. Select Edit from context menu. The source schema elements are available in the left panel on the edit function dialog. The functions available in the mapper are available in the right panel of the function dialog.
  2. Drag and drop the element in the expression configuration area.
  3. Drag and drop the functions in the expression configuraiton area.
Tip   You can use any valid XSLT function, not only the functions from palette.
Caution   You are responsible for the validity of this custom code; therefore, it is neccessary to simulate the created map before you run it on the server.

For example, if you want to transform the string 1937-06-01T10:45:03' into '19370601 you could use: substring(translate(translate(translate($value,'T',''),'-',''),':',''),1,8).

Visual Mapper transformation of the substring

In this example, the string is converted in the value argument by replacing all characters in string1 with the characters in string2. If string2 was empty, the characters defined with string1 are deleted in the result signature: translate(value : string, string1 : string, string2 : string) : string

Visual Mapper transformation of the substring

Visual Mapper transformation of the substring from the source element

 

Related Links