I am having a problem with scoping of parameters in my XSLT
Stylesheet...here is the stylesheet (the xml document is irrelevant
for the example)
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="myParam">Stylesheet Default</xsl:param>
<xsl:template match="/">
<result_explicit_call>
<xsl:call-template name="test">
<xsl:with-param name="myParam">Explicit Call</xsl:with-param>
</xsl:call-template>
</result_explicit_call>
<result_template_default>
<xsl:call-template name="test"/>
</result_template_default>
</xsl:template>
<xsl:template name="test">
<xsl:param name="myParam">Template Default</xsl:param>
<xsl:value-of select="$myParam"/>
</xsl:template>
</xsl:stylesheet>
The 'Correct' result for this transform (what MSXML4 returns) is...
<result_explicit_call>Explicit Call</result_explicit_call>
<result_template_default>Template Default</result_template_default>
However if I do it in .Net Version 1.1.4332 and pass down a new
parameter using xsltargument list ('Passed in'), it blows away all my
local scoping of the parameter...
<result_explicit_call>Passed in</result_explicit_call>
<result_template_default>Passed in</result_template_default>
Is this a known issue?? Is there a workaround??
Any help appreciated.
Michael Dausmann