Hi,
Unfortunately the tokenize() function is not supported by Tamino XQuery. But for counting the white-space separated substrings there exists a workaround. You can use the Tamino function tf:createTextReference() in the following way:
declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction”
count(
let $keyWord := “lewis and clark”
let $keyWordNode := {$keyWord}
return tf:createTextReference($keyWordNode ,“*”)
)
Since tf:createTextReference() expects a node as first argument you have to wrap your keyword into an element node. Applied on this element with the pattern “*” the tf:createTextReference() function creates a text reference for each substring. So you can get the number of substrings by counting the created text references.
Best regards,
Thorsten Fiebig
#webMethods#Tamino#API-Management