Używamy Altova Stylevision, która tworzy pliki XSLT 2.0. Używamy Saxon 9 dla Java, aby wykonać te pliki XSLT. To działa dobrze od kilku lat, niestety żaden z nas nie rozumie XSLT.XSLT 2.0 generuje błąd: "element kontekstowy jest niezdefiniowany"
Teraz mamy błąd:
Error at /xsl:stylesheet/xsl:function[9]
XPDY0002: Axis step child::element(item, xs:anyType) cannot be used here:
the context item is undefined
The 9th funkcji jest następująca:
<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>
Czy ktoś ma jakiś pomysł, co się dzieje?