I'm using this function to render items in a multi-select lookup field so that each one appears on a new line instead of AA;BB;CC;DD etc. This method uses the substring-before and substring-after functions on a loop to extract the semicolon-delimited values.
The trouble comes when there is an ampersand or other encoded character in the returned values. For example AA;B&C;DD is parsed as AA;B& amp;C;DD so the final result is
AA B& C
Is there a better way to extract the delimited values, telling xslt to separate on ';' but ignore '& amp;' ?
(I added the space in & amp; because the parser was outputting ampersands!!)