2

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.

Jeroen
  • 53,290
  • 30
  • 172
  • 279
James Helms
  • 871
  • 1
  • 8
  • 19

1 Answers1

2

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>
Alf Eaton
  • 4,344
  • 3
  • 35
  • 43