View Single Post
  #8 (permalink)  
Old March 17th, 2010, 08:01 AM
mrame mrame is offline
Friend of Wrox
Points: 1,306, Level: 14
Points: 1,306, Level: 14 Points: 1,306, Level: 14 Points: 1,306, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2008
Location: Pondicherry, India
Posts: 291
Thanks: 9
Thanked 29 Times in 29 Posts
Thumbs up

From the above it seems that you are not using <AB> and also trying to get the sum of 3 <AA>. Try using the below code without <xsl:text>&#xD;</xsl:text> inside variable:
Code:
<xsl:template match="/">
  <xsl:apply-templates select=".//ARXEURSL"/>
</xsl:template>
<xsl:template match="ARXEURSL">
 <xsl:variable name="t1" as="element(AA)*"> 
    <xsl:for-each-group select="G_ROW[INTRA_EU_TRX_CODE = ('GOODS','TRI')]" group-by="concat(VAT_TAX_NO,BILL_CUST_NAME,INTRA_EU_TRX_CODE)">
      <AA><xsl:value-of select="sum(current-group()/ACCTD_AMOUNT)"/></AA>
     
    </xsl:for-each-group>
  </xsl:variable>
    <xsl:for-each-group select="$t1" group-by="(position() - 1) idiv 3">
    <xsl:copy-of select="current-group()"/><xsl:text>&#xD;</xsl:text>
    <BB><xsl:value-of select="sum(current-group())"/></BB>
  </xsl:for-each-group>
</xsl:template>
__________________
Rummy
Reply With Quote