In xquery, I have a unknown length string str="/a/b/c" which I can split by tokenize(str, '/'), but what's the syntax to go through all the elements in tokenize result automatically based on string length?
for example /a/b/c will be a b c and for /a/b/c/d will be a b c d and so on.