[Saxon-JS 2] <xsl:call-template> param not passed within <ixsl:schedule-action>?
Martynas Jusevičius <martynas-tyFqBaoSXPC1Z/[email protected]> Tue, 8 Sep 2020 09:55:36 +0200
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <CAE35Vmz-LQMHRqOjd=DmSDsuAz46M_JejNM6sJfL94VNoe8a5A@mail.gmail.com> |
Hi,
I don't get how this can be happening, it's the same pattern which
I've used in a dozen other places -- supplying parameters to the
template called by <ixsl:schedule-action>.
I see the SELECT URI message being printed, so $select-uri cannot be
empty when it's supplied.
Yet this time Saxon-JS throws an error:
code: "XTTE0600"
message: "Required cardinality of value in 'xsl:param
name=\"Q{}select-uri\"' expression is exactly one; supplied value is
empty"
name: "XError"
oe: "869"
What could be the possible circumstances for this?
The code:
<xsl:template name="apl:RootLoad">
<xsl:context-item as="map(*)" use="required"/>
<xsl:choose>
<xsl:when test="?status = 200">
<xsl:for-each select="?body">
<xsl:variable name="select-uri"
select="key('resources', $ldt:base)/dh:select/@rdf:resource"
as="xs:anyURI?"/>
<xsl:if test="$select-uri">
<xsl:message>SELECT URI: <xsl:value-of
select="$select-uri"/></xsl:message>
<ixsl:schedule-action http-request="map{
'method': 'GET', 'href': $select-uri, 'headers': map{ 'Accept':
'application/rdf+xml' } }">
<xsl:call-template
name="apl:RootChildrenSelectLoad">
<xsl:with-param name="select-uri"
select="$select-uri"/>
</xsl:call-template>
</ixsl:schedule-action>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
...
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="apl:RootChildrenSelectLoad">
<xsl:context-item as="map(*)" use="required"/>
<xsl:param name="select-uri" as="xs:anyURI"/>
...
Martynas