hi folks,
 i am using saxon 8.9 jar.
when i am applying following xsl to my xml i am getting the the exception.

xsl :

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes"/>
  <xsl:template match="/technology">
    <xsl:for-each-group select="/technology/CATALOG//CD" group-by="COUNTRY">
      <xsl:sort select="COUNTRY"/>
      <COUNTRY name="{COUNTRY}">
        <xsl:for-each-group select="current-group()" group-by="YEAR">
          <YEAR year="{YEAR}">
            <xsl:copy-of select="current-group()/TITLE"/>
          </YEAR>
        </xsl:for-each-group>
      </COUNTRY>
    </xsl:for-each-group>
  </xsl:template>
</xsl:stylesheet>

code :


            System.setProperty(
                        "javax.xml.TransformerFactory",
                        "net.sf.saxon.TransformerFactoryImpl");
            //StreamSource xmlDoc = new StreamSource(new FileInputStream("catalog.xml"));
           
            //TransformerFactory tFactory = TransformerFactory.newInstance();
            TransformerFactory tFactory= TransformerFactory.newInstance();
            StreamSource stylesheet = new StreamSource(new FileInputStream("style.xsl"));
            Transformer transformer = tFactory.newTransformer(stylesheet);
           
            StreamResult result = new StreamResult(new FileOutputStream("C:/Reports1.xml"));
           
            transformer.transform(xmlDoc,result);

Error :

avax.xml.transform.TransformerException: Could not find function: current-group
    at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:649)
    at org.apache.xpath.compiler.XPathParser.FunctionCall(XPathParser.java:1496)
    at org.apache.xpath.compiler.XPathParser.PrimaryExpr(XPathParser.java:1435)
    at org.apache.xpath.compiler.XPathParser.FilterExpr(XPathParser.java:1334)