[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Slow XSLT

Subject: Re: Slow XSLT
From: Cleyton Jordan <cleytonjordan@xxxxxxxxxxx>
Date: Fri, 29 Feb 2008 20:04:14 +0000 (GMT)
Re:  Slow XSLT
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.