Question

I need to know if the previous node was a @selected node. I need to basically mark the next/following node if it exists with a special css class.

I tried the following code and it threw an exception

<xsl:if test="(preceding-sibling:@selected = 1)">next</xsl:if>

Here is a copy of the xslt with your suggestion in it: http://pastebin.com/gANkhz2g

The menu is the standard menu:

<dnn:MENU id="nameMenu" MenuStyle="Simple" runat="Server"/>

I honestly do not know the xml that is produced by that control.

Was it helpful?

Solution

Use preceding-sibling::node[1] to select the first (in reverse order) preceding sibling named "node":

<xsl:if test="preceding-sibling::node[1]/@selected = 1">next</xsl:if>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top