[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] stackOverflowError while doing generte-id and sum
We are doing the grouping in order to establish the unique values for currency and do grand total summation for following like xml.. <REPORT> <ENTITY NUMBER="1"> <FUND_GROUP CURRENCY="GBP"> <ROW> <SOME_VALUE>100</SOME_VALUE> </ROW> <ROW> <SOME_VALUE>200</SOME_VALUE> </ROW> <ROW> <SOME_VALUE>300</SOME_VALUE> </ROW> </FUND_GROUP> <FUND_GROUP CURRENCY="USD"> <ROW> <SOME_VALUE>100</SOME_VALUE> </ROW> <ROW> <SOME_VALUE>200</SOME_VALUE> </ROW> <ROW> <SOME_VALUE>300</SOME_VALUE> </ROW> </FUND_GROUP> </ENTITY> <ENTITY NUMBER="2"> <FUND_GROUP CURRENCY="GBP"> <ROW> <SOME_VALUE>100</SOME_VALUE> </ROW> <ROW> <SOME_VALUE>200</SOME_VALUE> </ROW> </FUND_GROUP> <FUND_GROUP CURRENCY="USD"> <ROW> <SOME_VALUE>200</SOME_VALUE> </ROW> <ROW> <SOME_VALUE>300</SOME_VALUE> </ROW> </FUND_GROUP> </ENTITY> </REPORT> and this xsl works well.. <xsl:for-each select="$currencies"> <xsl:if test="generate-id(.)= generate-id( $currencies[ @CURRENCY = current()/@CURRENCY ] )"> <tr> <td align="left" width="23%"><b>Grand Total (<xsl:value-of select="@CURRENCY"/>):</b></td> <td align="right" width="14%"><xsl:text> </xsl:text></td> <td align="right" width="7%"><xsl:text> </xsl:text></td> <td align="right" width="14%"><b><u><xsl:value-of select="format-number(sum( $currencies[@CURRENCY=current()/@CURRENCY]/FUND_ROW/OPENING_VALUE ), '#,###,###,##0.00')"/></u></b></td> <td align="right" width="14%"><xsl:text> </xsl:text></td> <td align="right" width="14%"><b><u><xsl:value-of select="format-number(sum( $currencies[@CURRENCY=current()/@CURRENCY]/FUND_ROW/CURRENT_VALUE), '#,###,###,##0.00')"/></u></b></td> <td align="right" width="14%"><b><u><xsl:value-of select="format-number(sum( $currencies[@CURRENCY=current()/@CURRENCY]/FUND_ROW/MTD_DIVIDEND_NUMBER), '#,###,###,##0.00')"/></u></b></td> </tr> </xsl:if> </xsl:for-each> except once we go over 4500 records or so, we get stackOverflowError.... what to do?? help!! it generates the report without grand total.. or sometimes, it crashes tomcat as well... at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:530) at java.lang.Thread.run(Thread.java:479) ----- Root Cause ----- java.lang.StackOverflowError at org.apache.xalan.xsltc.util.IntegerArray.quicksort(IntegerArray.java:198) at org.apache.xalan.xsltc.util.IntegerArray.quicksort(IntegerArray.java:198) at org.apache.xalan.xsltc.util.IntegerArray.quicksort(IntegerArray.java:198) at org.apache.xalan.xsltc.util.IntegerArray.quicksort(IntegerArray.java:198) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|