Subject: Re: [xsl] concating strings in a loop From: Jarkko.Moilanen@xxxxxx Date: Fri, 6 Feb 2004 13:07:37 +0200 |
Lainaus Jarkko.Moilanen@xxxxxx: < Lainaus Herwig Posedu <herwig.posedu@xxxxxxxxxx>: < < < 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"> < <xsl:value-of select="name" /> < <xsl:if test="../position()!=last()">,</xsl:if> < </xsl:for-each> Uuups.... Shoudl probably work better if: <xsl:for-each select="person"> <xsl:value-of select="name" /> <xsl:if test="position()!=last()">,</xsl:if> </xsl:for-each> *************************************************** * Jarkko Moilanen * * Dokumentoinnin kehittäjä * * Profound XML technology Expert * * DokuMentori Oy * * www.dokumentori.fi * *************************************************** XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] concating strings in a lo, Jarkko . Moilanen | Thread | Re: [xsl] concating strings in a lo, Herwig Posedu |
Re: [xsl]using template match for a, David Carlisle | Date | RE: [xsl] concating strings in a lo, Michael Kay |
Month |