xsl-list
[Top] [All Lists]

RE: Using XSl:Variable and XSL:if together.

2004-03-31 23:49:11
FAQ,

oh. I just realized that Variable value cann't be reset once 
it is defined.

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

  <xsl:choose>
  <xsl:when test="position() mod 2 = 1">
  ...
  <xsl:when>
  <xsl:otherwise>
  ...
  </xsl:otherwise>
  <xsl:choose>

or if you can't use position, you have to count the preceding nodes yourself.

Cheers,

Jarno


<Prev in Thread] Current Thread [Next in Thread>