This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Looping and assigning into variable
- From: "Venkateshwar Bommineni" <vbommineni at elogex dot com>
- To: <XSL-List at lists dot mulberrytech dot com>
- Date: Thu, 28 Mar 2002 10:46:34 -0500
- Subject: [xsl] Looping and assigning into variable
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi all,
How can I do this in XSLT?
<xsl: variable name="CommentVar"/>
<xsl:for-each select="Header">
<!-- here i would like to get the current 'Comment'
value and
concatenate with the previous comment value
through above 'CommentVar', something like below-->
<xsl:value-of
select="CommentVar=concat(Comment,$CommentVar)"/>
</xsl:for-each>
<!-- here I would like to get the concatenated list of all
'Comment' values -->
<Comments>
<xsl:value-of select="$CommentVar"/>
</Comments>
Basically Each 'Header' element has 1 'Comment' child element in it. So
I have to loop through all headers and finally get the complete list of
concatenated 'Comment's
Thanks in advance..
VENKAT
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list