I have a string "aa::bb::aa"
and need to turn it in to "aa, bb, aa"
I have tried
translate(string,':',', ')
but this returns "aa,,bb,,aa"
How can this be done.
I have a string "aa::bb::aa"
and need to turn it in to "aa, bb, aa"
I have tried
translate(string,':',', ')
but this returns "aa,,bb,,aa"
How can this be done.
A very simple solution (that will work as long as your string value doesn't have spaces):
normalize-space()
to collapse multiple whitespace characters into a single space " "A more robust solution would be to use a recursive template:
You can use it like this:
You can use this
Syntax:-
fn:tokenize(string,pattern)
Example:
tokenize("XPath is fun", "\s+")
Result: ("XPath", "is", "fun")