PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3268 *** shadow/3268 Fri Aug 24 16:41:34 2001 --- shadow/3268.tmp.22894 Fri Aug 24 16:41:34 2001 *************** *** 0 **** --- 1,46 ---- + +============================================================================+ + | redefinition of variables in new scope | + +----------------------------------------------------------------------------+ + | Bug #: 3268 Product: XalanJ2 | + | Status: NEW Version: CurrentCVS | + | Resolution: Platform: PC | + | Severity: Major OS/Version: Windows NT/2K | + | Priority: Other Component: Xalan-Xsltc | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + The xsltc compiler fails to compile xslt code that defines variables in an inner + scope that have the same name as variables in an outer scope. xt and other xslt + interpreters handle this correctly. + + Consider how the following xslt redefines a variable "bar" in a new (inner scope): + + <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > + <xsl:output method="xml" indent="yes" /> + + <xsl:template match="/"> + <xsl:variable name="bar">outer</xsl:variable> + <outer bar="{$bar}"> + <xsl:for-each select="./*"> + <xsl:variable name="bar">inner</xsl:variable> + <inner bar="{$bar}"/> + </xsl:for-each> + </outer> + </xsl:template> + + </xsl:stylesheet> + + The expected output from this xslt (which xt, for one produces), is as follows: + + <?xml version="1.0" encoding="utf-8"?> + <outer bar="outer"> + <inner bar="inner"/> + </outer> + + xsltc fails to compile this xslt. It generates neither class files nor error + messages.
