|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Jumping out a loop
> I have the following loop: > > <xsl:for-each select="Grasslands/*[position()>3 and text()]"> > <h3><font color="#00007f"><i><xsl:value-of > select="name()"/></i></font></h3> > <p><font color="#008000"><xsl:value-of select="."/></font></p> > </xsl:for-each> > > I want to jump out the loop It helps to think about these problems if you understand the processing model. <xsl:for-each> isn't a loop: it's a function mapping. It says that in the output you want one Y for every X that appears in the input. Since it's not a loop, jumping out of it doesn't make sense. What you need is a different function. I can't answer your problem without understanding your requirement better, but it looks to me as if you want two <xsl:for-each> instructions: <xsl:for-each select="one set of nodes">...</xsl:for-each> <xsl:for-each select="another set of nodes">...</xsl:for-each> Mike Kay Software AG XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








