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

Re: Counting using variable inside the loop

Subject: Re: Counting using variable inside the loop
From: Arulraj <p_arulraj@xxxxxxxxx>
Date: Thu, 11 Mar 2004 01:44:31 -0800 (PST)
xslt counting loop
Thank you Jeni Tennison
This counting works fine.

--- Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> wrote:
> Hi Arulraj,
> 
> > But I want to make a count row, when I reach first
> row I should this
> > is first row. when next row encounter I should say
> this is second
> > row.
> 
> Use <xsl:number> (no need to specify any attributes)
> to give you these
> numbers, or calculate them yourself by counting the
> number of
> preceding sibling rows to the current one, and
> adding one, with:
> 
>   count(preceding-sibling::row) + 1
> 
> > I tried with <xsl:variable>
> 
> You can't change the value of a variable in XSLT
> (it's a declarative
> language rather than a procedural one). If you were
> stepping through
> the <row> elements one by one, you could use a
> parameter to keep track
> of them, but usually one of the above methods works
> fine.
> 
> Cheers,
> 
> Jeni
> 
> ---
> Jeni Tennison
> http://www.jenitennison.com/
> 
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you?re looking for faster
http://search.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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.