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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


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

Reply via email to