Spurious error on recursive invocation of fn:transform
Ihe Onwuka <[email protected]> Mon, 23 Nov 2020 12:15:14 -0500
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <CALfs7+wXRz4U8SerXPzn4G+MVsFTTB41g=yVLKoo2P-S52X=MQ@mail.gmail.com> |
XTSE0150 The supplied file does not appear to be a stylesheet
at function local:generateNextVersion in translator.xsl:
invoked by function call
I have
<xsl:variable name="currentStylesheet" as="document-node()"
select="doc('')"/>
and then the recursive function
<xsl:function name="local:generateNextVersion" as="document-node()">
<xsl:param name="currentVersion" as="document-node()"/>
<xsl:variable name="isFinalVersion" as="xs:boolean"
select="namespace-uri($currentVersion/*) => contains($finalTarget)"/>
<xsl:sequence select="if ($isFinalVersion)
then $currentVersion
else local:generateNextVersion(fn:transform(map
{
'stylesheet-node' : $currentStylesheet,
'source-node' : $currentVersion
})?output)"/>
</xsl:function>
This functions works through the first 2 recursion cycles. When I have a
situation that would cause it to recurse a 3rd time the reported error
shows up.
Whatever is wrong with the program it cannot be what is being reported
because the stylesheet node is being directly populated by doc('') and that
doesn't magically stop being a recursive call to the current stylesheet
after a set number of iterations.
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help