Bug #2291
closedbyte-code error java.lang.NoSuchMethodException: net.sf.saxon.om.SequenceIterator.itemAt(int)
100%
Description
With byte-code generation enabled, the script that follows will not compile.
Two notes:
i) It runs without byte-code generation.
ii) If either of the xsl:with-param instructions in the xsl:next-iteration instruction is commented out, it compiles. Only when both are present is there an error.
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:saxon="http://saxon.sf.net/"
xmlns:map="http://www.w3.org/2005/xpath-functions/map"
exclude-result-prefixes="xs saxon map">
<xsl:template match="/">
<xsl:variable name="sessions" select="//session"/>
<xsl:variable name="day.session.map" as="map(xs:integer,node()+)">
<xsl:map>
<xsl:map-entry key="1" select="$sessions[1]"/>
</xsl:map>
</xsl:variable>
<xsl:variable name="PG1.succession.info">
<xsl:iterate select="saxon:sort(map:keys($day.session.map))">
<xsl:param name="N" as="xs:double" select="0"/>
<xsl:param name="D" as="xs:double" select="0"/>
<xsl:param name="admins" as="xs:double" select="0"/>
<xsl:param name="promotions" as="xs:double" select="0"/>
<xsl:variable name="day.sessions" select="$day.session.map(.)"/>
<xsl:variable name="todays.N" select="+($day.sessions)[1]/@value"/>
<xsl:variable name="todays.D" select="+($day.sessions)[1]/@value"/>
<xsl:variable name="info" as="xs:double+">
<xsl:variable name="N.mid" select="round($N * 0.5)"/>
<xsl:variable name="D.mid" select="round($D * 0.5)"/>
<xsl:sequence select="(($todays.N - $N.mid) div 16,($todays.D - $D.mid) div 16)"/>
</xsl:variable>
<xsl:next-iteration>
<xsl:with-param name="admins" select="$info[2]"/>
<xsl:with-param name="promotions" select="$info[1]"/>
</xsl:next-iteration>
</xsl:iterate>
</xsl:variable>
<data>
<xsl:copy-of select="$PG1.succession.info"/>
</data>
</xsl:template>
</xsl:stylesheet>
Files
Updated by David Rudel almost 10 years ago
I'm attaching a file in case the copy-and-pasted code is difficult to retrieve.
Updated by Michael Kay almost 10 years ago
- Assignee set to O'Neil Delpratt
- Priority changed from Low to Normal
- Found in version changed from Saxon-EE 9.5.1.7 to 9.5
Thanks for reporting it. I've identified the offending code (FilterExpressionCompiler line 82), and it's still there in the 9.6 and 9.7 branches. Testing a fix will take a little longer.
Updated by O'Neil Delpratt almost 10 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Bug fixed and committed to subversion version (Branches 9.5, 9.6 and 9.7). The itemAt method should be called on the MemoClosure.
Patch available in the next maintenance release.
Updated by O'Neil Delpratt almost 10 years ago
- Status changed from Resolved to In Progress
The fix applied to the 9.6 and 9.7 branches does not work with 9.5 due to differences between the release.
Updated by Michael Kay over 9 years ago
- Status changed from In Progress to Resolved
I'm marking this resolved for tidiness. It's not actually resolved for 9.5, but we'll deal with that if anyone hits it - we're not fixing 9.5 bugs practively at this stage.
Updated by O'Neil Delpratt over 9 years ago
- Found in version changed from 9.5 to 9.5 9.6
- Fixed in version set to 9.6.0.5
Bug fix applied in the Saxon 9.6.0.5 maintenance release. Close when fixed in the 9.5 release
Updated by O'Neil Delpratt over 9 years ago
Bug fix applied in the 9.5 branch available in the next maintenance release.
Updated by O'Neil Delpratt over 9 years ago
- Status changed from Resolved to Closed
- Fixed in version changed from 9.6.0.5 to 9.5.1.10 9.6.0.5
Bug fix applied in the Saxon 9.5.1.10 maintenance release
Please register to edit this issue