Hi all,

 

I am using saxon to output html and I notice that I am applying the same template twice. Normally I have no problem with this, but the apply-templates call in this particular case is expensive for large input data. I am seeking a simple way to make a single template call. I tried (as a hack) using a variable like so:

 

    <xsl:variable name="colsumm">

<xsl:apply-templates select="groupsummary/col" mode="summary">

                        <xsl:with-param name="rowtype" select="’sum1’"/>

            </xsl:apply-templates>

    </xsl:variable>

 

But this (to no surprise) mangles/eliminates the html tags in the output. Any help is appreciated.

 

Jeff

Example xsl:  

 

<xsl:template match="data//group" mode="normal">

 

<!-- do some stuff here -->

<!--  generate attribute information for header -->

 

<!--  build summary columns for header row……… -->

<xsl:apply-templates select="groupsummary/col" mode="summary">

                        <xsl:with-param name="rowtype" select="’sum1’"/>

            </xsl:apply-templates>

 

<!-- do some more stuff here -->

<!--  generate attribute information for summary -->

 

<!--  build summary columns for summary row……… -->

<xsl:apply-templates select="groupsummary/col" mode="summary">

                        <xsl:with-param name="rowtype" select="’sum1’"/>

            </xsl:apply-templates>

 

</xsl:template>