[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Looping using XSL

Subject: Re: Looping using XSL
From: Josh Campbell <josh@xxxxxxxxxx>
Date: Wed, 02 Oct 2002 18:21:48 +1200
Re:  Looping using XSL
Vasu Chakkera wrote:

Doesnt <xsl:for-each select="//*[position() &lt;= 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() &lt;= 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.