----- Original Message ----
From: "Buchcik, Kasimier" <[EMAIL PROTECTED]>
> While implementing the cleanup of temporary tree fragments directly
> when an instruction exits, I noticed that we'll get problems if
> trying to do the same for extension elements. With the current
> implementation of EXSLT's functions, this won't work:
Ah, you just refreshed my memory a bit. I actually perform the external data
gathering in an extension element, assigning it to a variable for processing.
<xsl:variable name="results">
<my:sql table="some_table">
<columns>.....</columns>
<selection>....</selection>
</my:sql>
</xsl:variable>
<xsl:for-each select="exsl:node-set($results)/row">
<xsl:variable name="results2">
<my:sql table="some_other_table">....</my:sql>
</xsl:variable>
<xsl:for-each select="exsl:node-set($results2)/row">
....
So the main problem I had, if I remember correctly, was that although the
variable results2 would go out of scope with each of iteration of the first
<xsl:for-each>
it would not get freed until the parent template (i.e. xsltApplyOneTemplate)
was exited. The workaround was to always call into a named template directly
under
each xsl:for-each that did any external data fetching, so the lifespan of the
nested sql results would be reduced.
Again, probably a corner case here, though I'm probably not the only one using
extension elements and functions to gather significant amounts of data.
_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
[email protected]
http://mail.gnome.org/mailman/listinfo/xslt