backward compatibility with exsl
--------------------------------
Key: XALANJ-2002
URL: http://nagoya.apache.org/jira/browse/XALANJ-2002
Project: XalanJ2
Type: Bug
Components: Xalan-extensions
Versions: 2.6
Environment: with xalan 2.6.0
Reporter: Bruno PIERRE
There is somthing weird that wasn't with xalan 2.4.1
In some case i have to put a paramter in a variable before giving it to an
apply-templates
If i don't the parameter is wrong.
Here is my stylesheet:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xmlns:exsl="http://exslt.org/common"
xmlns:dyn="http://exslt.org/dynamic"
extension-element-prefixes="exsl dyn"
exclude-result-prefixes="exsl dyn"
>
<xsl:template match="/">
<xsl:variable name="test">
<a>1</a>
</xsl:variable>
<xsl:variable name="testnode" select="exsl:node-set($test)"/>
<root>
<!-- using a variable before giving the param to apply-templates -->
<test type="withvariable">
<xsl:variable name="param" select="dyn:map(.,'$testnode')"/>
<xsl:apply-templates select="/" mode="test">
<xsl:with-param name="param" select="$param"/>
</xsl:apply-templates>
</test>
<!-- NOT using a variable before giving the param to apply-templates -->
<test type="direct">
<xsl:apply-templates select="/" mode="test">
<xsl:with-param name="param" select="dyn:map(.,'$testnode')"/>
</xsl:apply-templates>
</test>
</root>
</xsl:template>
<xsl:template match="/" mode="test">
<xsl:param name="param"/>
<xsl:copy-of select="$param"/>
</xsl:template>
</xsl:stylesheet>
And here is my result with xalan2.6.0
<root>
<test type="withvariable">
<a>1</a>
</test>
<test type="direct" />
</root>
And when i come back to xalan 2.4.1
i've the "good" result
<root>
<test type="withvariable">
<a>1</a>
</test>
<test type="direct">
<a>1</a>
</test>
</root>
I'm sure the two code must display have the same result, or perhaps i didn't
understand something about xslt.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]