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

tdt:tokenize()
This function is similar to the str:tokenize function defined in EXSLT. It splits a string and returns a node set of token elements. Each node set contains one token from the string.
Signature
<node-set> tdt:tokenize(<node-set>, <string>)
<node-set>
<string>
String containing a number of characters, where each character is interpreted as a delimiting character. The strings in <node-set> are split at any occurrence of any of these characters.
Example
Data source
<data/>
Expected result
<data>
<tokenize>2001</tokenize>
<tokenize>06</tokenize>
<tokenize>03</tokenize>
<tokenize>11</tokenize>
<tokenize>40</tokenize>
<tokenize>23</tokenize>
</data>
Data template
<data>
<tokenize>?</tokenize>
</data>
Data transformation
<tdt:rule path="/data/tokenize">
<tdt:value key=".">tdt:tokenize('2001-06-03T11:40:23', '-T:')
</tdt:value>
<tdt:value key="text()">text()</tdt:value>
</tdt:rule>
OpenText StreamServe 5.6.2 Updated: 2018-01-26