我的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>