Re: [xsl] Slow XSLT

Subject: Re: [xsl] Slow XSLT
From: "Manfred Staudinger" <manfred.staudinger@xxxxxxxxx>
Date: Sat, 15 Mar 2008 00:19:38 +0100
On 14/03/2008, Cleyton Jordan <cleytonjordan@xxxxxxxxxxx>
>  Because I use Javascript to align my GRID, I have to
>  apply templates in a certain order i.e:
>
>  1- build the bottom right section first (grdBody)
>  2- next build the top right section (column headings)
>  3- Build the bottom left section (row headings)
>  4- Finaly build the top left section which is just an
>  empty div with the right hight and width to align with
>  the rest of the grid.
I can't see this. You start a xsl-transformation an you get the
resulting html which contains all 4 sections. To access them with
javascript, you use an id which the xslt has added.

> Please note that I used to be able to control all
>  these sections using the MODE ATTRIBUTE
>
>  <xsl:apply-templates select="Rows//Row"
>  mode="heading">
>
>  However, with apply-templates I might not have this
>  control. What do you think?
Just use
   <xsl:apply-templates mode="heading">
I think your difficulty stems from a misconception: the select
attribute has its XPath expression evaluated to construct a set of
nodes (in XSLT 1.0) and apply-templates pushes this set to the
"template- machine". If there is _no_ select attribute in
apply-templates then the current node gets pushed to it.

> How difficult do you think it would be to change my
> approach of using 4 DIVs and 4 Tables to build the
> grid and instead creating just one table?
You would have to mimic with xslt what is already built in into html
tables and you will run certainly into more performance problems.

I would like to invite you to an off-list conversation to clarify the
html/javascript concept with you. With such a concept in hands it
would be much easier to clarify the xslt issues.

Regards,

Manfred

Current Thread