In the Graphical Data Mapping editor, you can use the fn:substring transform to set the value of an output element to a substring of the original input value. You must define the start position, and optionally, the number of characters that you need to extract.
The fn:substring XPath 2.0 function takes two arguments, an input string and a 1-based number, to return a part of the original string, beginning from the position indicated. You can also specify a third optional parameter as a number, to indicate the end position to compose the resulting string.
The following function call fn:substring("12345", 2, 3) returns "234".
The following function call fn:substring("12345", 2) returns "2345".
For more information about XPath, see XPath tutorial or
W3C XML Path Language (XPath)
2.0.
The fn:substring transform takes as input one simple type element. This element is used to define the first argument of the fn:substring function.
In the following figure, the fn:substring transform has one input. The input is used to define the first argument of the fn:substring function.
You can use any of the input elements to the fn:substring transform to define a conditional expression that defines the condition under which the transform is applied. If the condition evaluates to true, the transform is applied.
For more information, see Configuring the properties of a transform.