Hi Martin,
This Xalan-J XSLT 3.0 implementation issue, has been fixed on
Xalan-J's XSLT 3.0 development branch.
On Thu, Dec 4, 2025 at 9:03 PM Martin Honnen <[email protected]> wrote:
> One more issue, I can access the property "number" with the lookup
> operator ?number but trying to access the property "next" to call it
> fails "?next()".
>
> So with more context, the following works fine:
>
> <?xml version="1.0" encoding="utf-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="3.0"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:mf="http://example.com/mf"
> exclude-result-prefixes="#all"
> expand-text="yes">
>
> <xsl:function name="mf:random-number-sequence" as="xs:double*">
> <xsl:param name="n" as="xs:integer"/>
> <xsl:iterate select="1 to $n">
> <xsl:param name="rng"
> select="random-number-generator(current-dateTime())"/>
> <xsl:sequence select="$rng?number"/>
> <xsl:next-iteration>
> <xsl:with-param name="rng" select="$rng('next')()"/>
> </xsl:next-iteration>
> </xsl:iterate>
> </xsl:function>
>
> <xsl:template match="/*">
> <xsl:copy>{mf:random-number-sequence(10)}</xsl:copy>
> </xsl:template>
>
> </xsl:stylesheet>
>
> But this fails with Xalan (error fatalError: Could not find function:
> {http://www.w3.org/2005/xpath-functions}next()):
>
> <?xml version="1.0" encoding="utf-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="3.0"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:mf="http://example.com/mf"
> exclude-result-prefixes="#all"
> expand-text="yes">
>
> <xsl:function name="mf:random-number-sequence" as="xs:double*">
> <xsl:param name="n" as="xs:integer"/>
> <xsl:iterate select="1 to $n">
> <xsl:param name="rng"
> select="random-number-generator(current-dateTime())"/>
> <xsl:sequence select="$rng?number"/>
> <xsl:next-iteration>
> <xsl:with-param name="rng" select="$rng?next()"/>
> </xsl:next-iteration>
> </xsl:iterate>
> </xsl:function>
>
> <xsl:template match="/*">
> <xsl:copy>{mf:random-number-sequence(10)}</xsl:copy>
> </xsl:template>
>
> </xsl:stylesheet>
--
Regards,
Mukul Gandhi