[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: LOOP-LIMIT
--ZmUaFz6apKcXQszQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Wouldn't you just do... <xsl:for-each select=3D"/root/child[number(@id) < 5]"> =2E.. </xsl:for-each> :) On Fri, Mar 01, 2002 at 02:54:04PM -0000, cutlass wrote: >=20 > ----- Original Message ----- > From: "William Rutford" <vsd18@xxxxxxxxxxxxxx> > To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> > Sent: Friday, March 01, 2002 2:43 PM > Subject: LOOP-LIMIT >=20 >=20 > > > > Hi > > I have a problem .. here it goes.. > > > > xml structure: > > > > <root> > > <child id =3D '1'/> > > <child id =3D '2'/> > > <child id =3D '3'/> > > <child id =3D '4'/> > > <child id =3D '5'/> > > <child id =3D '6'/> > > </root> > > > > i have to run an <xsl:for-each> for the 'child' only till child id > > =3D '4'.. > > i want to write the condition of the following type > > if(id > 4) > > { > > do something.. > > } > > else > > { > > do something else > > } >=20 > try this >=20 > xslt > -------------------------------------------------------------------------= --- > ------- >=20 > <?xml version=3D"1.0"?> > <xsl:stylesheet version=3D"1.0" > xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"> > <xsl:template match=3D"/"> > <xsl:for-each select=3D"//child"> > <xsl:choose> > <xsl:when test=3D"number(@id)>4"> > do something > </xsl:when> >=20 > </xsl:choose> > </xsl:for-each> >=20 > </xsl:template> > </xsl:stylesheet> >=20 > cheers, jim fuller >=20 > > > > can some one suggest me a way tro do that?? > > thanks > > vasu > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > >=20 >=20 > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list --=20 David B. Bitton david@xxxxxxxxxxxxxx Diversa ab illis virtute valemus. --ZmUaFz6apKcXQszQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8f5tfMNOMzNRRk50RAr8qAKCr6auPmMSCGzPVZSntcXPf+s34GQCgndDT jYvTAtwYXfOcQ+nNEe0m6Vs= =iKRt -----END PGP SIGNATURE----- --ZmUaFz6apKcXQszQ-- 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
|