I needed to translate carriage returns and line feeds to <BR/> elements in an XSLT process. Sometimes you get hung up how you normally use functions and then hit a language wall that you think should work,
In this case, the solution was to iterate over the selection and output the elements with an appended tag.