mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-09-14 05:09:26 +03:00
The RVTs referenced from function results must not be blindly registered as local, as they might be part of variables from an outer scope. Remove LOCAL/VARIABLE distinction for RVTs. Don't register as local RVT unconditionally when reflagging as LOCAL. Instead, register function result RVTs from inner variables as local RVTs when they're released in xsltFreeStackElem. Keep local function result RVTs xsltReleaseLocalRVTs instead of reregistering. Closes: https://gitlab.gnome.org/GNOME/libxslt/issues/2 Thanks to Daniel Mendler and Martin Gieseking for the reports.
21 lines
528 B
XML
21 lines
528 B
XML
<xsl:stylesheet version="1.0"
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
xmlns:exsl="http://exslt.org/common"
|
|
xmlns:func="http://exslt.org/functions"
|
|
xmlns:my="my-namespace"
|
|
extension-element-prefixes="exsl func">
|
|
|
|
<xsl:template match="/">
|
|
<xsl:variable name="var">
|
|
<var>value</var>
|
|
</xsl:variable>
|
|
<xsl:copy-of select="my:func($var)"/>
|
|
</xsl:template>
|
|
|
|
<func:function name="my:func">
|
|
<xsl:param name="var"/>
|
|
<func:result select="$var"/>
|
|
</func:function>
|
|
|
|
</xsl:stylesheet>
|