|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Counting using variable inside the loop
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
|
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
|

Cart








