Re: [xsl] Sub total generation - filter problem

Subject: Re: [xsl] Sub total generation - filter problem
From: Geert Josten <Geert.Josten@xxxxxxxxxxx>
Date: Thu, 16 Dec 2004 21:32:58 +0100
Ah!

That makes things a lot clearer to me! I only now noticed there were four entries with AUD, but they were grouped two by two and you want separate sub totals for the two groups!

Now that I know what the problem is, I can point you to what is going wrong: you test whether bs_group or bs_categ differs, but when filtering on currency (curr_code), you will have to test for differences in curr_code as well. The following-sibling might have the same bs_group and bs_categ, but not the currency you are looking for at all..

Be aware of the fact that following-sibling works on the input document, not on the nodes set you supplied to the last apply-templates. Using xsl:apply-templates select="MyTable" or xsl:apply-templates select="MyTable[curr_code = 'AUD']" does not effect the result of following-sibling::MyTable[1] used within the MyTable template. In either case it could result in a MyTable with curr_code CAD.

Cheers,
Geert

Srinivasan, Sundar wrote:

Hi Geert,

Thanks for thre reply. The sub totals are not working when you filter with
curr-code='AUD'.
The output should show a break after 'Cash and Due from banks' but it's not.
Could you kindly
follow up? Regards.

-----Original Message-----
From: Geert Josten [mailto:Geert.Josten@xxxxxxxxxxx]
Sent: Thursday, December 16, 2004 3:11 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Sub total generation - filter problem


Hi Sundar,


You have two xsl:key statements in your XSL, but you added the filter only to
the first. I think you should better add them to both. That will probably give better (sub)total
results. Subtotal is showing at least, and as before, it basically seems to work...


Cheers,
Geert

Srinivasan, Sundar wrote:


I think I am NOT good enough to be in this list..but I NEED help.
I am creating detail lines and sub totals. It works fine with XSLT-ONE . The
bs_categ totals are off or not produced
when I filter by currency in the <key> and apply-templates as in XSLT-TWO.

Any


help would be greatly appreciated.
Regards.

XML:..................XSLT-ONE: and XSLT-TWO follow


==============================================================================
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==============================================================================




-- Geert.Josten@xxxxxxxxxxx IT-consultant at Daidalos BV, Zoetermeer (NL)

http://www.daidalos.nl/
tel:+31-(0)79-3316961
fax:+31-(0)79-3316464

GPG: 1024D/12DEBB50

Current Thread