xsl-list
[Top] [All Lists]

Re: [xsl] Slow XSLT

2008-03-02 18:15:31
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, '{(_at_)class}')">Total
Pages</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(2, 1, '{(_at_)class}')">Cost</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(1, 2, '{(_at_)class}')">Total
Pages</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(2, 2, '{(_at_)class}')">Cost</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(1, 3, '{(_at_)class}')">Total
Pages</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(2, 3, '{(_at_)class}')">Cost</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(1, 4, '{(_at_)class}')">Total
Pages</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(2, 4, '{(_at_)class}')">Cost</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(1, 5, '{(_at_)class}')">Total
Pages</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(2, 5, '{(_at_)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, '{(_at_)class}')">Total
Pages</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(2, 1, '{(_at_)class}')">Cost</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(1, 2, '{(_at_)class}')">Total
Pages</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(2, 2, '{(_at_)class}')">Cost</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(1, 3, '{(_at_)class}')">Total
Pages</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(2, 3, '{(_at_)class}')">Cost</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(1, 4, '{(_at_)class}')">Total
Pages</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(2, 4, '{(_at_)class}')">Cost</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(1, 5, '{(_at_)class}')">Total
Pages</div>
                                        </nobr>
                    </td>
                    <td align="center">
                        <nobr><div class="action"
style="width:90px; overflow:none"
onclick="sortFullGrid(2, 5, '{(_at_)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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>