[xslt] libxslt <xsl:apply-templates><xsl:with-param/></xsl:apply-templates> broken

Package:	libxslt
Version: 	1.0.0

(xsltproc -V
Using libxml 20400 and libxslt 10000
xsltproc was compiled against libxml 20400 and libxslt 10000
libxslt 10000 was compiled against libxml 20400

When using <xsl:apply-templates select="foo"><xsl:with-param name="foo2"
select="foo3" /></xsl:apply-templates> the parameter is never passed.  The
template is based upon a match.  I thought that according to the spec that
apply-templates (match) could contain with-param;  This same code works with
Sablotron and Xalan/Xerces. The only way that I can get parameters to be
passed is with a <xsl:call-template><xsl:with-param/></xsl:call-template>.


<xsl:template match="/" >
<xsl:for-each select="foos/foo">
select="document(concat('/path/to/xml/',@fooattr,'.xml'))" > <!-- root node
of each XML doc is fooz -->
		<xsl:with-param name="currentLevel" select="position()" />

<xsl:template match="fooz" >
	<xsl:param name="currentLevel" />
	<xsl:value-of select="$currentLevel" /> <!-- this prints nothing; it should
print the current -->
	....... <!-- process the nodes from the included XML doc -->

I suggest that <xsl:template match="foo"> should behave the same as
<xsl:template name="foo"> with passing parameters to the template.

I am using Mandrake 8, kernel version 2.4.2, glibc 2.2.2.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]