Transform
The transform element generates output by applying a user provided function. The parameters to the function can be read from the source, or can be fixed values. The return form the function is written to the provided target.
<transform>
<target/>
<function/>
</transform>
Parameters
target
- Specifies the fully qualified path for the output data.
function
- Specifies the name and parameters of a function that will be applied to perform the transformation.
Example 1
<!--Applies a transform that writes the three inputs as a concatenated string.-->
<script>
function createDate(day, month, year)
{
// Return date in the format DD-MM-YY
return day + "-" + month + "-" + year;
}
</script>
<transform>
<target> SSC/Payload/SalesOrder/Date</target>
<function name="createDate">
<param>SSTSInput/Payload/PurchaseOrder/Date/Day</param>
<param>SSTSInput/Payload/PurchaseOrder/Date/Month</param>
<param>SSTSInput/Payload/PurchaseOrder/Date/Year</param>
</function>
</transform>