父轴上下文项的必需项类型是node();提供的值的项目类型为xs:untypedAtomic

时间:2019-03-01 15:34:14

标签: xslt

我的XSLT出现此错误,我不知道为什么:

Required item type of the context item for the parent axis is node(); supplied value has item type xs:untypedAtomic

我在这一行得到它:

<xsl:when test="../../Ratios/Ratio[@id=$Ratio]/RatioElementValue[@year=$YEAR][@displayValue != '' and contains(@displayValue, '(') and contains(@displayValue, ')')]">

它在一个选择语句中

<xsl:choose>
         <xsl:when test="../../Ratios/Ratio[@id=$Ratio]/RatioElementValue[@year=$YEAR][@displayValue != '' and contains(@displayValue, '(') and contains(@displayValue, ')')]">
             NA
         </xsl:when>
         <xsl:otherwise>
             <xsl:value-of select="../../Ratios/Ratio[@id=$Ratio]/RatioElementValue[@year=$YEAR]/@displayValue"/>
         </xsl:otherwise>
     </xsl:choose> 

0 个答案:

没有答案