This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Looping and assigning into variable
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: "Venkateshwar Bommineni" <vbommineni at elogex dot com>
- Cc: XSL-List at lists dot mulberrytech dot com
- Date: Thu, 28 Mar 2002 16:11:52 +0000
- Subject: Re: [xsl] Looping and assigning into variable
- Organization: Jeni Tennison Consulting Ltd
- References: <2BE2749CDC8FC748B83D9465B48EA7AF47135C@exchange.elogex.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Venkat,
> 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
Just do:
<Comments>
<xsl:for-each select="Header">
<xsl:value-of select="Comment" />
</xsl:for-each>
</Comments>
In other words, construct the concatenated list of comments when you
need the concatenated list of comments, don't try to build it at the
same time as doing something else. It's very hard doing two things at
once with XSLT.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list