select =" ./ node()"之间的差异并选择=" node()"在DSpace的item-view.xsl中

时间:2017-11-01 13:42:23

标签: xslt xpath dspace

在DSpace' item-view.xsl select dim:field的陈述中,我找到了

<xsl:copy-of select="node()"/>

在上下文中:

<xsl:for-each select="dim:field[@element='description' and @qualifier='abstract']">
   <xsl:choose>
      <xsl:when test="node()">
         <xsl:copy-of select="node()"/>
      </xsl:when>

以及

<xsl:copy-of select="./node()"/>

在上下文中:

<xsl:for-each select="dim:field[@element='identifier' and @qualifier='uri']">
   <a>
      <xsl:attribute name="href">
         <xsl:copy-of select="./node()"/>
      </xsl:attribute>

我想知道在此设置中node()./node()之间是否存在任何差异,如果有,会有什么区别?

1 个答案:

答案 0 :(得分:3)

不,没有区别。

请参阅https://msdn.microsoft.com/en-us/library/ms256086(v=vs.110).aspx

表达式./nodenode是等效的。