Subject: Re: concating strings in a loop
From: Peter Flynn <pflynn@xxxxxx>
Date: Fri, 06 Feb 2004 14:54:20 +0000
|
On Fri, 2004-02-06 at 10:02, Herwig Posedu wrote:
> hi!
> i want to display a list of persons "comma-seperarted" on my pdf-file.
> how can i concate those person-names seperated with a "," but in that
> way, that after the last name is no ",".
> i did it like this
>
> <xsl:for-each select="person">
> <xsl:value-of select="name" />
> ,<fo:inline color="white">.</fo:inline>
> </xsl:for-each>
> -> the output for example is: mike, john,
> -> i want to have: mike, john
> how can i concate the strings and substring it, so that the last comma
> will be removed
<xsl:for-each select="person">
<fo:inline color="white">
<xsl:value-of select="name"/>
</fo:inline>
<xsl:if test="position()!=last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
///Peter
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|
Rajendra Singh Rawat - Fri, 6 Feb 2004 05:52:54 -0500 (EST)
Michael Kay - Fri, 6 Feb 2004 06:20:24 -0500 (EST)
Peter Flynn - Fri, 6 Feb 2004 09:55:02 -0500 (EST) <=
Andrew Welch - Tue, 10 Feb 2004 09:28:42 -0500 (EST)
|
|