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/03/02 22:10:50 UTC

DO NOT REPLY [Bug 6819] New: - XSLTC: Variable scoping problem with literal result elements.

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: xalan-dev@xml.apache.org
        ReportedBy: derek.sayeau@cognos.com


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>