This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: for-each sort of thing in {} ?
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: for-each sort of thing in {} ?
- From: "Carole E. Mah" <carole at goon dot stg dot brown dot edu>
- Date: Thu, 8 Jun 2000 16:50:50 -0400 (EDT)
- Reply-To: xsl-list at mulberrytech dot com
On Thu, 8 Jun 2000, Ben Robb wrote:
> <xsl:template match="foo">
> <xsl:variable name="qstring">
> <xsl:for-each select="bar">
> <xsl:if test="postition() != 1">
> &
> </xsl:if>
> id<xsl:value-of select="position()"/>=<xsl:value-of
> select="@id"/>
> </xsl:for-each>
> </xsl:variable>
> </xsl:template>
Ben,
Thanks very, very much. Duh, of course a variable is the solution.
However, one has to change the content of the XSL:FOR-EACH element to:
<xsl:if test="position() != 1">&</xsl:if>id<xsl:value-of select="position()"/>=<xsl:value-of select="@id"/>
so that the whitespace does not become part of the element.
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Carole E. Mah Carole_Mah@Brown.edu
Senior Programmer/Analyst
Brown University Scholarly Technology Group
phn 401-863-2669
fax 401-863-9313
http://www.stg.brown.edu/
personal: http://www.stg.brown.edu/staff/carole.html
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list