[xsl] [Fwd: call-template with-param]

Subject: [xsl] [Fwd: call-template with-param]
From: Martin Wiklund <pm-w@xxxxxxx>
Date: Mon, 15 Dec 2003 09:13:54 +0100
I have two xml-files, one containing the actual data, and the other
containing translations of the entries from the first. In the xsl I have:

<xsl:template match="/">
...
 	<xsl:call-template name="translate_entry">
		<xsl:with-param name="entry_id"/>
	</xsl:call-template>
...
</xsl:template>
<xsl:template name="translate_entry" match="*/id">
  <xsl:param name="entry_id"/>
  <xsl:value-of select="document( 'descr.xml'
)/entries/entry[@id='$entry_id']"/>
</xsl:template>

The result of translate_entry is "", but a <xsl:value-of select="id">
outputs the correct value, and when I change the criteria to
<xsl:value-of select="document( 'descr.xml'
)/entries/entry[@id='123']"/> I get the correct translation, for a '123'
that is.


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread