Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Slow XSLT

From: Cleyton Jordan <cleytonjordan@----------->
To:
Date: 3/3/2008 1:15:00 AM
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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent