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/11 15:28:03 UTC
DO NOT REPLY [Bug 7027] New: -
xsl:element with QName containing variable reference produces error
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=7027>.
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=7027
xsl:element with QName containing variable reference produces error
Summary: xsl:element with QName containing variable reference
produces error
Product: XalanJ2
Version: 2.3
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Major
Priority: Other
Component: Xalan-Xsltc
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: mwright_us@yahoo.com
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:test="ThisIsATest" exclude-result-prefixes="test">
<xsl:template match="*">
<xsl:variable name="test:_foo" select="'FooName'"/>
<xsl:variable name="test:_bar" select="'BarName'"/>
<xsl:element name="{$test:_foo}">
<xsl:attribute
name="{$test:_bar}">BarValue</xsl:attribute>
<xsl:text>FooValue</xsl:text>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
This stylesheet works with XALAN and Oracle's XSLT translator but the following
is produced from the XSLTC compiler:
java org.apache.xalan.xsltc.cmdline.Compile -o Test
Compiler warning(s):
file:/w:/work/xsl/Test.xsl: line 6: Namespace prefix '{$test' is undeclared.
The same kind of reference in xsl:attribute does not cause the same error (?)