Given the following sample;
<ul id="s-nav">
<xsl:for-each select="$currentPage/ancestor-or-self::node [@level=2]/node">
<li>
<xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
<xsl:attribute name="class">current</xsl:attribute>
</xsl:if>
</li>
</xsl:for-each>
</ul>
When the current node is the same as the current <li>, the attribute class is set to 'current'.
Now I want to set a second attribute within the if block, but for the previous <li>, not the current. Any idea how to accomplish this?
Many thanks.