1
나는 Umbraco를 사용 중이며 XSLT에 약간의 문제가 있습니다. 내가 루트 아래 또는 nodeC의 아래가 nodeA에서 nodeA에서에서 노드 B를 얻을 수 있기를 원하는xslt - 하위 노드 유형 가져 오기
root
nodeA
nodeB
nodeB
nodeB
nodeC
nodeA
nodeB
nodeB
nodeB
:
나는 다음과 같은 구조를 가지고있다.
<xsl:param name="currentPage"/>
<xsl:variable name="siteRoot" select="$currentPage/ancestor-or-self::*/nodeC" />
<xsl:template match="/">
<!-- start writing XSLT -->
<xsl:for-each select="$siteRoot/ancestor-or-self::*/nodeA/nodeB">
<xsl:if test="string(umbracoNaviHide) != '1'">
<li style="background-image: none;">
<xsl:if test="position() = last()">
<xsl:attribute name="class">no-border</xsl:attribute>
</xsl:if>
<a>
<xsl:attribute name="href">
<xsl:value-of select="umbraco.library:NiceUrl(current()/@id)"/>
</xsl:attribute>
<xsl:attribute name="style">
text-decoration: none;
</xsl:attribute>
<xsl:value-of select="./Name" /></a></li>
</xsl:if>
</xsl:for-each>
</xsl:template>
@Dimire - XPath에 대한 책이 읽기 목록에 있습니다. MVC3, Entity Framework 및 Objective-C 바로 다음에 :) –