Subject: Re: [xsl] LOOP-LIMIT From: Corey_Haines@xxxxxxxxxxxxxxx Date: Fri, 1 Mar 2002 09:57:16 -0500 |
You could do something like <xsl:for-each select="root/child[@id<4]"> Do Something </xsl:for-each> <xsl:for-each select="root/child[@id>3]"> Do Something Else </xsl:for-each> Or, <xsl:for-each select="root/child"> <xsl:choose> <xsl:when test="@id < 4"> Do Something </xsl:when> <xsl:otherwise> Do Something Else </xsl:otherwise> </xsl:choose> </xsl:for-each> -Corey "William Rutford" <vsd18@xxxxxxxxxxxxxx> 03/01/2002 09:43 AM Please respond to xsl-list To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx cc: (bcc: Corey Haines) Subject: [xsl] LOOP-LIMIT Hi I have a problem .. here it goes.. xml structure: <root> <child id = '1'/> <child id = '2'/> <child id = '3'/> <child id = '4'/> <child id = '5'/> <child id = '6'/> </root> i have to run an <xsl:for-each> for the 'child' only till child id = '4'.. i want to write the condition of the following type if(id > 4) { do something.. } else { do something else } can some one suggest me a way tro do that?? thanks vasu XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] LOOP-LIMIT, naha | Thread | Re: [xsl] LOOP-LIMIT, Hans Huber |
Re: [xsl] LOOP-LIMIT, cutlass | Date | Re: [xsl] LOOP-LIMIT, Hans Huber |
Month |