[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] LOOP-LIMIT
Subject: Re: [xsl] LOOP-LIMIT From: "David B. Bitton" <david@xxxxxxxxxxxxxx> Date: Fri, 01 Mar 2002 10:16:47 -0500 |
Wouldn't you just do... <xsl:for-each select="/root/child[number(@id) < 5]"> ... </xsl:for-each> :) On Fri, Mar 01, 2002 at 02:54:04PM -0000, cutlass wrote: > > ----- Original Message ----- > From: "William Rutford" <vsd18@xxxxxxxxxxxxxx> > To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> > Sent: Friday, March 01, 2002 2:43 PM > 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 > > } > > try this > > xslt > ---------------------------------------------------------------------------- > ------- > > <?xml version="1.0"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:template match="/"> > <xsl:for-each select="//child"> > <xsl:choose> > <xsl:when test="number(@id)>4"> > do something > </xsl:when> > > </xsl:choose> > </xsl:for-each> > > </xsl:template> > </xsl:stylesheet> > > cheers, jim fuller > > > > > 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 -- David B. Bitton david@xxxxxxxxxxxxxx Diversa ab illis virtute valemus.
Attachment:
pgp00000.pgp
Description: PGP signature
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] LOOP-LIMIT, cutlass | Thread | Re: [xsl] LOOP-LIMIT, naha |
Re: [xsl] LOOP-LIMIT, naha | Date | RE: [xsl] comparison of strings hav, Pemmaraju Phani Kuma |
Month |