Skip to content

Instantly share code, notes, and snippets.

@xquery
Created December 29, 2011 21:37
Show Gist options
  • Save xquery/1536327 to your computer and use it in GitHub Desktop.
Save xquery/1536327 to your computer and use it in GitHub Desktop.
xquery - split a comma delimited string and add text to each item
i've interpreted what you may want to achieve, but mileage may vary
xquery version "1.0";
let $string := "test,test,test,test,test"
return
for $text in tokenize($string,',')
return
<text>{concat('add some text: ', $text)}</text>
should return each text item in a <text/> element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment