Re: [Saxon-JS 2] <xsl:call-template> param not passed within <ixsl:schedule-action>?
Martynas Jusevičius <martynas-tyFqBaoSXPC1Z/[email protected]> Wed, 9 Sep 2020 11:15:13 +0200
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <CAE35VmzaVX3i6O04y=mbYrGjTw3bXF2ZdBQP2suoPnidxNsY7w@mail.gmail.com> |
My mistake, as usual... I didn't notice that later on apl:RootChildrenSelectLoad was calling itself by mistake, so the error came from that call. On Tue, Sep 8, 2020 at 12:24 PM Michael Kay <[email protected]> wrote: > > I can't see any reason for this, I think we would need a repro so we can try it out ourselves. > > Michael Kay > Saxonica > > On 8 Sep 2020, at 08:55, Martynas Jusevičius <[email protected]> wrote: > > 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 > > > _______________________________________________ > saxon-help mailing list archived at http://saxon.markmail.org/ > [email protected] > https://lists.sourceforge.net/lists/listinfo/saxon-help > > > _______________________________________________ > saxon-help mailing list archived at http://saxon.markmail.org/ > [email protected] > https://lists.sourceforge.net/lists/listinfo/saxon-help _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [email protected] https://lists.sourceforge.net/lists/listinfo/saxon-help