This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Looping using XSL
- From: Josh Campbell <josh at zype dot co dot nz>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 02 Oct 2002 18:21:48 +1200
- Subject: Re: [xsl] Looping using XSL
- References: <F143U05s5cv2ooBhUaR00010e18@hotmail.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Vasu Chakkera wrote:
Doesnt <xsl:for-each select="//*[position() <= rating]">
iterate through all the child elements of the context node ., in this
case "mood"..
so essentially since it has only one child element( "rating" ), It
should iterate only once irrespective of the condition *[position()
<= rating]">
so you xsl should produce only one line.
<div class="moodbar"><img src="layout/global/pics/mood-red.gif" alt=""
/></div>
Vasu
That's what I've just found...though I appreciated the idea :-)
Sorry if the words 'looping' and 'iterate' have confused the issue but
I'm not sure what else to call it.
I guess what's needed is some way of testing against the number in the
rating node and write out the html line until the rating is equalled.
Josh
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list