Data templates and transformations > Data transformation process reference > Custom XPath functions for data transformation > tdt:concat()

tdt:concat()
This function is similar to the str:concat function defined in EXSLT. It takes a node set and a string separator and returns the concatenation of the string values of the nodes in that node set.
Note:
Do not confuse tdt:concat() with standard XPath concat().
Signature
<string> tdt:concat(<node-set>[, <string>])
<node-set>
<string>
String separator (can be an empty string). If no separator is defined, the strings are concatenated without a separator.
Example
Data source
<data>
<message>
<word>We</word>
<word>are</word>
<word>having</word>
<word>fun</word>
</message>
</data>
Expected result
<data>
<sentence>We are having fun</sentence>
</data>
Data template
<data>
<sentence>?</sentence>
</data>
Data transformation
<tdt:rule path="/data/sentence">
<tdt:value key="text()">tdt:concat(/data/message/word, ' ')
</tdt:value>
</tdt:rule>
OpenText StreamServe 5.6.2 Updated: 2018-01-26