DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=29079>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=29079 Wrong access to out-of-scope xsl:variable not detected in certain circumstances Summary: Wrong access to out-of-scope xsl:variable not detected in certain circumstances Product: XalanC Version: 1.7 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: XalanC AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] In the following very short stylesheet, Template2 is refering to variable 'OutOfScope' which is declared locally within Template1, not Template2. This error goes undetected by XalanC version 1.7.0. Note that if the declaration of variable "result" surrounding the call to Template2 is removed, that is, Template2 is called directly within Template1, then Xalan complains that variable 'OutOfScope' is not defined. <?xml version="1.0" encoding = "ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template name="Template1" match="/"> <xsl:variable name="OutOfScope" select="."/> <xsl:variable name="result"> <xsl:call-template name="Template2"/> </xsl:variable> <xsl:copy-of select="$result"/> </xsl:template> <xsl:template name="Template2"> <xsl:copy-of select="$OutOfScope"/><!-- ALG: This variable should not be visible, should it? --> </xsl:template> </xsl:stylesheet> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
