Re: [xsl] Slow XSLT

Subject: Re: [xsl] Slow XSLT
From: Cleyton Jordan <cleytonjordan@xxxxxxxxxxx>
Date: Fri, 29 Feb 2008 20:04:14 +0000 (GMT)
Hi David,


>without following in detail what processing you are
>doing it's hard to
> say 
>sorry got to dash, perhaps someone else can say more!

>David


I need to build a nested heading Rows/Columns (<TR>
and <TD>). The output should look like this for the
2003 heading:

                          2003                
    Quarter 1        Quarter 2        Quarter 3       
   Quarter 4 
Total Pages Cost Total Pages Cost Total Pages Cost   
Total Pages  Cost

<ColGrp heading="Quarter">
  <ColGrp heading="2003">
    <Col heading="Quarter 1" />
    <Col heading="Quarter 2" />
    <Col heading="Quarter 3" />
    <Col heading="Quarter 4" />
  </ColGrp>
</ColGrp>

I use the xpath below to get me to the inner most
ColGrp (parent of Col elements). 

Normally $depth = 1 
//ColGrp[count(ancestor::ColGrp)=$depth]

//ColGrp[count(ancestor::ColGrp)=1]

So, I go to the ancestor:ColGrp whose depth = 1  

This will produce the first <TD>s

2003      2004

Then all the Col elements will produce the second row
with all the <TD>s

Quarter 1   Quarter 2      Quarter 3       Quarter 4 

And lastly, for each Col element I have to go back to
the Measure elements to produce the final Row which
will be the same for all the Col elements

Total Pages Cost Total Pages Cost Total Pages Cost
Total Pages Cost 

Therefore, this is the output I get with my XSLT but
it is too slow for big xml docs.

                         2003                
Quarter 1     Quarter 2    Quarter 3        Quarter 4 
Total Pages Cost Total Pages Cost Total Pages Cost   
                         
Cheers

C


      ___________________________________________________________ 
Rise to the challenge for Sport Relief with Yahoo! For Good  

http://uk.promotions.yahoo.com/forgood/

Current Thread