我们使用Altova Stylevision生成XSLT 2.0文件。我们使用Java的Saxon 9来执行这些XSLT文件。这已经运行良好了几年,但遗憾的是我们中没有人真正理解XSLT。
现在我们遇到了错误:
第九个功能是:
现在我们遇到了错误:
Error at /xsl:stylesheet/xsl:function[9]
XPDY0002: Axis step child::element(item, xs:anyType) cannot be used here:
the context item is undefined
第九个功能是:
<xsl:function name="sps:GoogleChartDataSourceUnitCount" as="xs:string">
<xsl:sequence select="concat(string-join(item/string(if ( number($XML/report/calculation-data[@data-source-name = $DataSourceParent]/item/variable[@name='unit_count']/@value) < 0 ) then 0 else round-half-to-even(number(variable[@name='unit_count']/@value),2)),','),'&chxl=0:|',string-join(item/variable[@name='month']/@value,'|'),'|2:||Min&chds=0,',string(round-half-to-even( max(item/(number(variable[@name='unit_count']/@value)))+1 , 0 )),'&chxr=1,0,',string(round-half-to-even( max(item/(number(variable[@name='unit_count']/@value)))+1 , 0 )))"/>
</xsl:function>
有人知道发生了什么事吗?