It appears to be a bug for Xalan interpretive. XSLTC is OK with this test.
Can you enter a bug into the JIRA database (
http://nagoya.apache.org/jira/secure/Dashboard.jspa)?
Thanks.
Morris Kwan
XSLT Development
IBM Toronto Lab
Tel: (905)413-3729
Email: [EMAIL PROTECTED]
Alex
<[EMAIL PROTECTED]
t> To
xalan-j-users
11/04/2004 06:41 <[EMAIL PROTECTED]>
PM cc
Subject
Variables inside params issue
Given the following template:
<xsl:template match="/">
<xsl:param name="fred">
<xsl:variable name="anything" select="'WRONG'"/>
</xsl:param>
<xsl:param name="frank" select="'anywho'"/>
frank: <xsl:value-of select="$frank"/>
</xsl:template>
What should the value of $frank be? When I run this, I get 'WRONG'. If
I remove the variable declaration inside the param "fred", I get
'anywho'. Is this not legal XSLT, or a bug?
Here is the command line:
java org.apache.xalan.xslt.Process -IN test.xml -XSL test.xsl -OUT test.out
Also:
> java org.apache.xalan.xslt.EnvironmentCheck | grep version.xalan
version.xalan2_2=Xalan Java 2.6.0
Thanks,
Alex
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/">
<xsl:param name="fred">
<xsl:variable name="anything" select="'WRONG'"/>
</xsl:param>
<xsl:param name="frank" select="'anywho'"/>
frank: <xsl:value-of select="$frank"/>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0"?>
<test>
<node>value_one</node>
<node>value_two</node>
</test><?xml version="1.0" encoding="UTF-8"?>
frank: WRONG