[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: LOOP-LIMIT

Subject: Re: LOOP-LIMIT
From: "cutlass" <cutlass@xxxxxxxxxxx>
Date: Fri, 1 Mar 2002 14:54:04 -0000
loop limit
----- Original Message -----
From: "William Rutford" <vsd18@xxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, March 01, 2002 2:43 PM
Subject:  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


Current Thread
  • LOOP-LIMIT
    • William Rutford - Fri, 1 Mar 2002 09:41:44 -0500 (EST)
      • cutlass - Fri, 1 Mar 2002 09:56:52 -0500 (EST) <=
      • naha - Fri, 1 Mar 2002 10:09:16 -0500 (EST)
      • <Possible follow-ups>
      • Corey_Haines - Fri, 1 Mar 2002 09:54:14 -0500 (EST)
        • Hans Huber - Fri, 1 Mar 2002 10:08:26 -0500 (EST)

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.