Subject: Re: [xsl] Looping using XSL From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 02 Oct 2002 12:11:15 -0400 |
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.
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Looping using XSL, Josh Campbell | Thread | Re: [xsl] Looping using XSL, Jeni Tennison |
RE: [xsl] Looping using XSL, Passin, Tom | Date | [xsl] counting the number of tokens, john liao |
Month |