Skip to content

Instantly share code, notes, and snippets.

@kparms
Created March 24, 2014 15:18
Show Gist options
  • Save kparms/9742233 to your computer and use it in GitHub Desktop.
Save kparms/9742233 to your computer and use it in GitHub Desktop.
Comma delimited for-each loop in XSLT
<!--I use this all the time-->
<xsl:for-each select="rm:field">
<xsl:value-of select="."/>
<!-- If we're not the last item, put a comma -->
<xsl:if test="(position() &lt; last())">
<xsl:text> , </xsl:text>
</xsl:if>
</xsl:for-each>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment