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=6819>.
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=6819

XSLTC: Variable scoping problem with literal  result elements.

           Summary: XSLTC: Variable scoping problem with literal  result
                    elements.
           Product: XalanJ2
           Version: 2.3
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: org.apache.xalan.xsltc
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The following stylesheet doesn't compile with xsltc. The error dumped to the 
console is: Error: Null.  If the variable var1 is declared before the literal 
result element level1 everything works. 

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
        <xsl:template match="/">
                <root>
                        <level1>
                                <xsl:variable name="var1" select="'var1'"/>
                                <xsl:attribute name="name">
                                        <xsl:value-of select="$var1"/>
                                </xsl:attribute>
                        </level1>
                </root>                                         
        </xsl:template>
</xsl:stylesheet>

Reply via email to