Hi,
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of Mark Vakoc
> Hum, part of my e-mail is missing, see below:
[...]
> > XSLT to reduce the overhead generated. Where I wanted to > do:
>
> > <xsl:template match="something">
> > <xsl:for-each select="my:sql-many-results-func()/results/row">
> > <xsl:for-each select="my:some-other-sql-query('some query
> using the previous row'">
>
> > </xsl:template>
>
> What I had to do was:
>
> <xsl:template match="something">
> <xsl:apply-templates select="my:sql-many-results-func()/results/row"/>
> </xsl:template>
>
> <xsl:template match="row">
> <xsl:apply templates select="my:some-other-sql-query('some
> query using the previous row')" mode="mode2"/>
> </xsl:template>
>
> <xsl:template match="row" mode="row2">
>
> </xsl:template>
Hmm, I think there should be no significant difference between those
two versions currently; seems this was already fixed some time ago.
What is still missing in the code, is to free resources created
by the instruction itself (not its content) early enough:
<xsl:template ...>
<xsl:for-each select="my:sql-many-results-func()/results/row">
<xsl:apply-templates select="my:some-other-sql-query('query-A')"/>
<xsl:apply-templates select="my:some-other-sql-query('query-B')"/>
</xsl:for-each>
</xsl:template>
Here the tree fragment created by the first inner xsl:apply-templates
would not be freed until an iteration of the outer xsl:for-each is
finished. This is due to xsltApplyOneTemplate(), which processes the
content of the outer xsl:for-each and frees the resources when exiting;
i.e., when all inner xsl:apply-templates have been processed.
Regards,
Kasimier
_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
[email protected]
http://mail.gnome.org/mailman/listinfo/xslt