Project

Profile

Help

Bug #4767

closed

xsl:with-param value evaluation in xsl:call-template in ixsl:schedule-action

Added by Martynas Jusevicius about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
IXSL extensions
Sprint/Milestone:
-
Start date:
2020-09-29
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
2
Fix Committed on JS Branch:
2
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

In a situation like this

<xsl:for-each select="$sequence">
    <xsl:variable name="item" select="." as="element()"/>
    <ixsl:schedule-action http-request="map{ ... } }">
        <xsl:call-template name="callback">
            <xsl:with-param name="value" select="$item"/>
        </xsl:call-template>
    </ixsl:schedule-action>
</xsl:for-each>

all the callback template invocations get the same (last?) $item as the value param. Expected: each $item in the sequence is passed as the invocation param.

The reason is that with-param values are evaluated at the time the action is scheduled, not at the time it completes.

From the mailing list: https://sourceforge.net/p/saxon/mailman/message/37118233/

Please register to edit this issue

Also available in: Atom PDF Tracking page