If i use
<xsl:value-of select="position()" />
inside a for-each loop in xsl it works great for an ascending counter. Is there any way to change it to a descending counter?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What about as simple as…
As fn:last returns the context size, and fn:position – the position of the currently processed item, you just have to substract 1 from their difference (as
positionstarts its count from 1, not 0).