On Dec 7, 2005, at 22:52, [EMAIL PROTECTED] wrote:

Hi,

I saw this question was still unanswered. This is most likely because it is indeed slightly OT for this list. For XSLT-related questions, you may want to check out the Mulberry XSLT list in the future.

I am confused about the group-by XSL functionality


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



However the values in $sortColumn1 has 4 different possibilities ....
lets say "A", "B", "C", "D"

and I need some logic that groups all "A"s into one group and everything
else into another group ( A = group1 -- B,C,D = group2 ) .

I haven't had much experience with XSLT 2.0 yet, but I suppose, since the group-by attribute must be an expression, you could try something like:

group-by="saxon:evaluate($sortColumn1)='A'"


HTH!

Cheers,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to