【问题标题】:Difference between select="./node()" and select="node()" in DSpace's item-view.xslDSpace 的 item-view.xsl 中 select="./node()" 和 select="node()" 的区别
【发布时间】:2017-11-01 13:42:22
【问题描述】:

在 DSpace 的 item-view.xslselectdim: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()在这个设置中是否有任何区别,如果有,有什么区别?

【问题讨论】:

    标签: xslt xpath dspace


    【解决方案1】:

    不,没有区别。

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

    表达式./nodenode 是等价的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-17
      • 1970-01-01
      • 2020-08-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多