[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Using XSl:Variable and XSL:if together.


Subject: RE: [xsl] Using XSl:Variable and XSL:if together.
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Thu, 1 Apr 2004 08:12:05 +0100

> So, is there a alternative way where I can do different 
> operation depending on the position of node(element) to be 
> even or odd.

Depends exactly what you mean by "position", but you can probably do

<xsl:if test="position() mod 2 = 0">

or

<xsl:if test="count(preceding-sibling::*) mod 2 = 0">

Michael Kay


Current Thread