Project

Profile

Help

XTDE1061: There is no current group in Saxon-HE-9.8.0-2

Added by Vladimir Nesterovsky 4 months ago

In Saxon-HE-9.8.0-2 from maven I get following error:

Error in xsl:variable/@select on line 16 column 37 of my.xslt:
  XTDE1061: There is no current group
  at xsl:apply-templates (.../my.xslt#22)
     processing /c/t[1]
  in built-in template rule for /c in the unnamed mode

for xslt:

<xsl:stylesheet version="2.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xsl:template match="/c">
    <xsl:variable name="c" as="element()*" select="*[2]"/>

    <xsl:variable name="t" as="element()*">
      <t n="T"/>
    </xsl:variable>

    <xsl:variable name="o" as="element()*">
      <xsl:for-each-group select="$t" group-by="@n">
        <xsl:variable name="g" as="element()+" 
          select="current-group()"/>

        <xsl:sequence select="$g[@n = $c/@n]"/>
      </xsl:for-each-group>
    </xsl:variable>

    <xsl:apply-templates>
      <xsl:with-param name="o" tunnel="yes" select="$o"/>
    </xsl:apply-templates>
  </xsl:template>

  <xsl:template match="t">
    <xsl:param name="o" tunnel="yes" as="element()*"/>
  </xsl:template>

</xsl:stylesheet>

and for input xml:

<c>
  <t n="T"/>
</c>

This works in previous versions.


Replies (2)

RE: XTDE1061: There is no current group in Saxon-HE-9.8.0-2 - Added by Vladimir Nesterovsky 4 months ago

Can you please confirm that the problem is reproduced on your side?

RE: XTDE1061: There is no current group in Saxon-HE-9.8.0-2 - Added by Michael Kay 4 months ago

Thanks for reporting it. I have reproduced the problem and have filed an issue here:

https://saxonica.plan.io/issues/3326

Please track that issue for a resolution.

Created W3C XSLT30 test case for-each-group-085

    (1-2/2)

    Please register to reply