Subject: Re: list with comma delimiter
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 09 Jun 2006 09:10:09 -0400
|
Or this, if you prefer templates:
<xsl:template match="product">
<xsl:apply-templates/>
<xsl:if test="following-sibling::product">, </xsl:if>
</xsl:template>
Cheers,
Wendell
At 07:31 AM 6/9/2006, you wrote:
<items>
<product>x</product>
<product>y</product>
<product>z</product>
<product>a</product>
</items>
You could try this:
<xsl:for-each select="product">
<xsl:value-of select="."/>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
|