Hi,
Since no one has replied to my post, I would like to try to clarify the problem I am having.
I need want 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 To
Is it possible to to improve the speed of the transformation?
I have posted the same question to another forum but apparently it might be too difficult to improve the speed of my XSLT since I only received one reply.
However, if someone has experienced speed problems with their xslt, I would like to kindly ask that you shed some light about my problem. Please let me know if my explanation is not clear enough so that I can try and make it clearer.
Cheers
C
|