You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Patricio Burbano <pb...@landmark.com> on 2000/05/04 22:59:31 UTC

possible bug

Hi,

I have been trying to get code that uses templates with parameters to work
with no luck.  I am using xalan 1.0.1.

Here is a copy of my test files:

test.xml:

<?xml version="1.0" encoding="UTF-8"?>

<TED>
	<NODE string='"one"'/>
	<NODE number='1'/>
</TED>


////////////////////////////////////////////////////

test.xsl

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="NODE">
	matched node...
	<xsl:apply-templates select="@*"/>
</xsl:template>

<xsl:template name="paramTemplate">
	<xsl:param name="word">No parameter...</xsl:param>
	{$word}
</xsl:template>

<xsl:template match="@*">
	<xsl:call-template name="paramTemplate">
		<xsl:with-param name="word">Real parameter passed.</xsl:with-param>
	</xsl:call-template>

	matched attribute...
	<xsl:value-of select="name()"/> =
	<xsl:value-of select="."/>
</xsl:template>



</xsl:stylesheet>




If this xsl file is applied to the xml file, the contents of the template
"paramTemplate" will be {$word} instead of the string being passed as a
parameter.

Please let me know if this is a bug or I am doing something wrong.

Patricio.
pburbano@landmark.com