是我的XSLT:如何获取当前节点变量的父节点元素?下面
<xsl:template match="/">
<xsl:call-template name="generateLinks">
<xsl:with-param name="currentPageBranchVariable" select="//Item[@CurrentPageBranch='true']"></xsl:with-param>
</xsl:call-template>
</xsl:template>
和:
<xsl:template name="generateLinks">
<xsl:param name="currentPageBranchVariable"></xsl:param>
<xsl:value-of select="$currentPageBranchVariable/@FullName"/>
// how to get the parent node of $currentPageBranchVariable?
</xsl:template>
可以看出,在$ currentPageBranchVariable是其中包含的项目节点的第二个模板的变量。
怎么可能从那里得到它的父元素?
我试过以下,但没有奏效:
<xsl:value-of select="../$currentPageBranchVariable/@FullName"/>
<xsl:value-of select="parent::node()/$currentPageBranchVariable/@FullName"/>
<xsl:value-of select="parent($currentPageBranchVariable)/@FullName"/>
希望这个问题是清楚的。
也许我想要做的事是不可能的?
谢谢,