We use Altova Stylevision, which creates XSLT 2.0 files. We use Saxon 9 for Java to execute these XSLT files. This has been working well for several years now, but none of us understands XSLT.
Now we have an error:
Error at /xsl:stylesheet/xsl:function[9] XPDY0002: Axis step child::element(item, xs:anyType) cannot be used here: the context item is undefined
9th function:
<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>
Does anyone know what is going on?
source share