You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/10/24 11:01:35 UTC

DO NOT REPLY [Bug 13920] New: - Redefining Variables

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13920>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13920

Redefining Variables

           Summary: Redefining Variables
           Product: XalanJ2
           Version: 2.0.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: org.apache.xalan
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: vasucv@hotmail.com
                CC: vasucv@hotmail.com


XALAN allows duplicate definition of the variables.
when the spec says...
 11.5 Variables and Parameters within Templates
 ....It is an error if a binding established by an xsl:variable or
 xsl:param element within a template shadows another binding established
 by an xsl:variable or xsl:param element also within the template.....

The following code works without error..

               <xsl:template match="Element">
		 <xsl:variable name="counter" select="1 + $counter"/>
		 <xsl:value-of select="$counter"/>
		 <xsl:variable name="counter" select="1 + $counter"/>
		 <xsl:value-of select="$counter"/>
	       </xsl:template>
Thanks