XSLT displays a multi-select column

Thanks to Marc again for this helpful article.

Here is the xsl code:

<xsl:template name=”MultiSelectDisplay”>
<xsl:param name=”MultiSelectValue”/>
<xsl:param name=”MultiSelectSeparator”/>
<xsl:when test=”contains($MultiSelectValue, ‘;’)”>
<xsl:value-of select=”concat(substring-before($MultiSelectValue, ‘;’), $MultiSelectSeparator)” disable-output-escaping=”yes”/>
<xsl:call-template name=”MultiSelectDisplay”>
<xsl:with-param name=”MultiSelectValue” select=”substring-after($MultiSelectValue, ‘;’)”/>
<xsl:with-param name=”MultiSelectSeparator” select=”$MultiSelectSeparator”/>
<xsl:value-of select=”$MultiSelectValue” disable-output-escaping=”yes”/>

Other useful SharePoint xsl templates written by Marc & Co can be found here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s