my input xml is :

<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>

this xslt is 2.0 bcz  for-each-group is new feature in xslt 2.0


On 8/21/07, Joe Fawcett <joefawcett@hotmail.com> wrote:
Well I don't have much experience using Java and XML but it looks like you
are using XSLT 1.0 instead of version 2.0 so the stuff that's supposed to
tell it to use Saxon isn't working as you want.

Joe

>From: "naveen kumar" <talluru37@gmail.com>
>Reply-To: Mailing list for SAXON XSLT queries
>< saxon-help@lists.sourceforge.net>
>To: "Mailing list for SAXON XSLT queries"
><saxon-help@lists.sourceforge.net>
>Subject: [saxon] Could not find function error occured when applying xslt
>toxml
>Date: Tue, 21 Aug 2007 14:56:54 +0530
>
>Even though irectified the previous exception by giving valid x path
>exception i am getting the below  exception
>
>Caused by: javax.xml.transform.TransformerException : Could not find
>function: current-group
>     at org.apache.xalan.processor.XSLTAttributeDef.processEXPR(
>XSLTAttributeDef.java:803)
>     at org.apache.xalan.processor.XSLTAttributeDef.processValue (
>XSLTAttributeDef.java:1398)
>     at org.apache.xalan.processor.XSLTAttributeDef.setAttrValue(
>XSLTAttributeDef.java:1589)
>     at
>org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes (
>XSLTElementProcessor.java:381)
>     at
>org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(
>XSLTElementProcessor.java:312)
>     at org.apache.xalan.processor.ProcessorTemplateElem.startElement (
>ProcessorTemplateElem.java:122)
>     at org.apache.xalan.processor.StylesheetHandler.startElement(
>StylesheetHandler.java:668)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement (Unknown
>Source)
>     at
>org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
>Source)
>     at
>org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
>Source)
>     at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>Source)
>     at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument (Unknown
>Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse (Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>Source)
>     at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates (
>TransformerFactoryImpl.java:972)
>
>My code is :
>\
>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);


>-------------------------------------------------------------------------
>This SF.net email is sponsored by: Splunk Inc.
>Still grepping through log files to find problems?  Stop.
>Now Search log events and configuration files using AJAX and a browser.
>Download your FREE copy of Splunk now >>  http://get.splunk.com/


>_______________________________________________
>saxon-help mailing list
>saxon-help@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/saxon-help



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
saxon-help mailing list
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help