[xsl] for-each-group

Subject: [xsl] for-each-group
From: thomas.maciejewski@xxxxxxxxx
Date: Mon, 12 Dec 2005 12:26:59 -0500
I am having a problem with for-each-group and it may be because I just dont
understand it.   (Hopefully I dont get flamed ;-) )

What I want to do is to create a set of groups based on a condition.  like
"foo='Internal'   is that allowed?

what i have been trying is :

            <xsl:for-each-group select="
xmlReportOutput/reportOutput/records/record" group-by="
                  <!--<xsl:for-each-group select="current-group()"
                  <xsl:sort select="saxon:evaluate($sortColumn1)" order="
                  <xsl:variable name="group1" select="
                  <xsl:call-template name="RenderByDesk">
                        <xsl:with-param name="tradeType" select="$group1"/>

But everything I try either produces no groups or fails and tells me my

Originally I was not doing the != Internal and it seemed to work grouping
by the saxon:evaluate($sortColumn1) field.    Ahh do I need to get the
value of that field?

Error in Xpath 2.0 expression Unknown function Name and number of arguments
do not match any function.

Can someone please give me a few pointers on for-each and for-each-group
?   I think I need to use the group one as later on I pass each group on to
a different template:

      <xsl:template name="RenderByDesk">
            <xsl:param name="tradeType"/>
            <xsl:for-each-group select="current-group()" group-by="
                  <xsl:sort select="saxon:evaluate($sortColumn2)" order="
                  <xsl:variable name="group2" select="
                  <xsl:call-template name="RenderByCounterPartyRole">
                        <xsl:with-param name="tradeType" select="$tradeType
                        <xsl:with-param name="desk" select="$group2"/>

Tom Maciejewski

This message and any attachments (the "message") are confidential and
intended solely for the addressees.
Any unauthorised use or dissemination is prohibited. 
E-mails are susceptible to alteration.   
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates 
shall be liable for the message if altered, changed or falsified. 


Current Thread