On 03/12/2025 13:35, Mukul Gandhi wrote:
Hi Martin,
     Thanks for reporting these issues with Xalan-J's xslt 3.0
development implementation.

The fixes for these have been committed to Xalan-J's xslt 3.0
development branch.


Thanks for the fixes, I have also now tested the most compact/advanced XPath 3.1 expression to create a sequence of random-numbers, it works fine with Saxon (both the Java product as well as the SaxonJS product) but fails with Xalan

<?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";
  exclude-result-prefixes="#all"
  expand-text="yes">

  <xsl:template match="/*">
    <xsl:copy>
      <xsl:sequence select="fold-left(1 to 5, random-number-generator(current-dateTime()), function($a, $i) { let $rng := head($a) return ($rng?next(), $rng?number, tail($a)) }) => tail()"/>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>

Failure with Xalan:

fatalError: org.apache.xpath.functions.FuncCurrentDateTime only allows 0 arguments; Line#: 10; Column#: 191 fatalError: org.apache.xpath.functions.FuncTail only allows 1 arguments; Line#: 10; Column#: 191


Expected output is a root element populated with five random numbers.

Reply via email to