1

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&amp 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!!)

1 Answer 1

1

I believe you just need to add disable-output-escaping="yes" to your xsl:value-of statement you display the & as a &.

1
  • Hey PirateEric, thanks for the reply. That was the first thing I tried, however I found that the rendering of the xsl:value-of occurs after the substring-before and substring-after functions are called on the original, encoded string. Commented Dec 7, 2011 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.