Do you really mean recursing? You could use recursion, but it would make more sense to me to just do a "for-each" loop. Do it inside a variable definition, and for each event, generate a pipe followed by the content from the event element. Then return the substring of the variable that starts at position 2 (to get rid of the opening pipe).
In XSLT 2.0, it's even easier, just use the 'string-join' function:
Author, XML APIs chapter
Advanced XML Applications from the Experts at The XML Guild