xsl:for-each is not a loop.
If you want to concatenate the values selected in an xsl:for-each then simply do e.g.
Code:
<xsl:variable name="v">
<xsl:for-each select="foo">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:variable>
Of course you don't need a variable if you simply want to add the values to the result tree, in that case doing e.g.
Code:
<xsl:for-each select="foo">
<xsl:value-of select="."/>
</xsl:for-each>
suffices.