You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "david Lowe (JIRA)" <xa...@xml.apache.org> on 2005/05/26 08:52:00 UTC
[jira] Commented: (XALANC-453) Bad unrolling of the variable stack after execution of for-each on empty nodeset.
[ http://issues.apache.org/jira/browse/XALANC-453?page=comments#action_66331 ]
david Lowe commented on XALANC-453:
-----------------------------------
I'm seeing same for XalanC 1.9 in an HP-UX environment. Very large generated XSL so not attached but relevant 'for-each' section as above.
What source files in CVSD for the fix? I've built 1.9 from available source.
> Bad unrolling of the variable stack after execution of for-each on empty nodeset.
> ---------------------------------------------------------------------------------
>
> Key: XALANC-453
> URL: http://issues.apache.org/jira/browse/XALANC-453
> Project: XalanC
> Type: Bug
> Components: XalanC
> Versions: 1.9
> Environment: MSVC6/Win2k
> Reporter: Alain Le Guennec
> Fix For: CurrentCVS
>
> Consider the following very simple stylesheet:
> <?xml version="1.0" encoding = "ISO-8859-1"?>
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:template match="/">
> <xsl:variable name="var1" select="."/>
> <xsl:for-each select="/..">
> <xsl:variable name="var2" select="/.."/>
> </xsl:for-each>
> <xsl:copy-of select="$var1"/>
> </xsl:template>
> </xsl:stylesheet>
> -When executing Xalan.exe on any input document with this stylesheet,
> I get the error that variable "var1" is not defined when executing copy-of.
> -If I remove the declaration of "var1" and the refering copy-of instruction,
> then I get a runtime exception: InvalidStackContextException: Invalid stack context (, line -1, column -1)
> -If I change "/.." into "/" in the for-each instruction, then everything works fine in both cases.
> I therefore suspect that variable declarations within the scope of for-each
> are removed out of the stack even if the for-each applied to an empty nodeset
> (and hence the nested variables were never pushed onto the stack).
> Best regards,
> Alain Le Guennec.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org