문제

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.

도움이 되었습니까?

해결책

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>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top