View Single Post
  #2 (permalink)  
Old January 9th, 2009, 11:16 AM
Martin Honnen Martin Honnen is offline
Friend of Wrox
Points: 6,673, Level: 34
Points: 6,673, Level: 34 Points: 6,673, Level: 34 Points: 6,673, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2007
Location: Germany
Posts: 1,242
Thanks: 0
Thanked 244 Times in 243 Posts
Default

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.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
Reply With Quote