Project

Profile

Help

Bug #2291

closed

byte-code error java.lang.NoSuchMethodException: net.sf.saxon.om.SequenceIterator.itemAt(int)

Added by David Rudel almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Byte code generation
Sprint/Milestone:
-
Start date:
2015-01-17
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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

Saxon_Debug_Iterator_at_Int.xsl (1.97 KB) Saxon_Debug_Iterator_at_Int.xsl David Rudel, 2015-01-17 13:38

Please register to edit this issue

Also available in: Atom PDF