Subject: Re: [xsl] Slow XSLT From: Cleyton Jordan <cleytonjordan@xxxxxxxxxxx> Date: Mon, 3 Mar 2008 01:14:56 +0000 (GMT) |
Hi Manfred, Thanks. > what is <ColGrp heading="Quarter"> and the > corresponding one after > <!--===TOTALS====--> for (both the outermost > ColGrp)? It seems there > is no corresponding output, please check it. > This is the Top most ColGrp (Top most axis). It is the direct child of the Columns element. Since I set the axisHeads param to false, this will never be displayed in my grid (table). It is just the top axis of my grid. <xsl:param name="axisHeads" select="'false'" /> The <--TOTALS---> ColGrp is the same as the other one except that I do not have any headings in this case. Later on, I will display the Total Pages and Cost from the other columns. Therefore, for the <--TOTALS--> ColGrp the td/div will not display any text but will have the right colspan (in this case 2 - because 1 Col * 2 Measures = 2). Only the Col heading will have a value for the Total i.e. Totals. I think it would be clearer if you saw the HTML output I get when I run my xslt. Again, this is with the axisHeads param set to false <xsl:param name="axisHeads" select="'false'" /> P.S. I have removed two Col elements from the XML to make it smaller and easier to debug. <Col heading="Quarter 1" /> <Col heading="Quarter 2" /> This is what the XML looks like now: <Reports> <Report> <Measures> <Measure idx="1" heading="Total Pages" /> <Measure idx="2" heading="Cost" /> </Measures> <Columns> <ColGrp heading="Quarter"> <ColGrp heading="2003"> <Col heading="Quarter 1" /> <Col heading="Quarter 2" /> </ColGrp> <ColGrp heading="2004"> <Col heading="Quarter 1" /> <Col heading="Quarter 2" /> </ColGrp> </ColGrp> <ColGrp> <ColGrp> <Col heading="Total" /> </ColGrp> </ColGrp> </Columns> </Report> </Reports> HTML 1 Using my Slow XSLT and setting axisHeads param to false +++++++++++++++++++++++++ <html> <body> <div id="g1" style="position: absolute; top: 0px; left: 0px; width: 400px; height: 12px"> <table class="grdTop" border="0" cellspacing="1" cellpadding="0"> <tbody> <tr> <td colspan="4" align="center" style="overflow: none"> <nobr><div>2003</div> </nobr> </td> <td colspan="4" align="center" style="overflow: none"> <nobr><div>2004</div> </nobr> </td> <td colspan="2" align="center" style="overflow: none"> <nobr><div></div> </nobr> </td> </tr> <tr /> <tr> <td colspan="2" valign="top" align="center" style="overflow: none"> <nobr><div>Quarter 1</div> </nobr> </td> <td colspan="2" valign="top" align="center" style="overflow: none"> <nobr><div>Quarter 2</div> </nobr> </td> <td colspan="2" valign="top" align="center" style="overflow: none"> <nobr><div>Quarter 1</div> </nobr> </td> <td colspan="2" valign="top" align="center" style="overflow: none"> <nobr><div>Quarter 2</div> </nobr> </td> <td colspan="2" valign="top" align="center" style="overflow: none"> <nobr><div>Total</div> </nobr> </td> </tr> <tr valign="bottom"> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(1, 1, '{@class}')">Total Pages</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(2, 1, '{@class}')">Cost</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(1, 2, '{@class}')">Total Pages</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(2, 2, '{@class}')">Cost</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(1, 3, '{@class}')">Total Pages</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(2, 3, '{@class}')">Cost</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(1, 4, '{@class}')">Total Pages</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(2, 4, '{@class}')">Cost</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(1, 5, '{@class}')">Total Pages</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(2, 5, '{@class}')">Cost</div> </nobr> </td> </tr> </tbody> </table> </div> </body> </html> ++++++++++++++++++ HTML 2 Using my slow XSLT and setting axisHeads param to true +++++++++++++++++++++++++ <html> <body> <div id="g1" style="position: absolute; top: 0px; left: 0px; width: 400px; height: 12px"> <table class="grdTop" border="0" cellspacing="1" cellpadding="0"> <tbody> <tr> <td colspan="8" align="center" style="overflow: none"> <nobr><div>Quarter</div> </nobr> </td> <td colspan="2" align="center" style="overflow: none"> <nobr><div></div> </nobr> </td> </tr> <tr> <td colspan="4" align="center" style="overflow: none"> <nobr><div>2003</div> </nobr> </td> <td colspan="4" align="center" style="overflow: none"> <nobr><div>2004</div> </nobr> </td> <td colspan="2" align="center" style="overflow: none"> <nobr><div></div> </nobr> </td> </tr> <tr> <td colspan="2" valign="top" align="center" style="overflow: none"> <nobr><div>Quarter 1</div> </nobr> </td> <td colspan="2" valign="top" align="center" style="overflow: none"> <nobr><div>Quarter 2</div> </nobr> </td> <td colspan="2" valign="top" align="center" style="overflow: none"> <nobr><div>Quarter 1</div> </nobr> </td> <td colspan="2" valign="top" align="center" style="overflow: none"> <nobr><div>Quarter 2</div> </nobr> </td> <td colspan="2" valign="top" align="center" style="overflow: none"> <nobr><div>Total</div> </nobr> </td> </tr> <tr valign="bottom"> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(1, 1, '{@class}')">Total Pages</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(2, 1, '{@class}')">Cost</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(1, 2, '{@class}')">Total Pages</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(2, 2, '{@class}')">Cost</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(1, 3, '{@class}')">Total Pages</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(2, 3, '{@class}')">Cost</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(1, 4, '{@class}')">Total Pages</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(2, 4, '{@class}')">Cost</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(1, 5, '{@class}')">Total Pages</div> </nobr> </td> <td align="center"> <nobr><div class="action" style="width:90px; overflow:none" onclick="sortFullGrid(2, 5, '{@class}')">Cost</div> </nobr> </td> </tr> </tbody> </table> </div> </body> </html> ___________________________________________________________ Rise to the challenge for Sport Relief with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Slow XSLT, Manfred Staudinger | Thread | Re: [xsl] Slow XSLT, Manfred Staudinger |
Re: [xsl] Help with XPath statement, Florent Georges | Date | [xsl] Is it possible to nest templa, Carla Lotito |
Month |