xsl-list
[Top] [All Lists]

[Fwd: call-template with-param]

2003-12-15 01:13:54
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[(_at_)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[(_at_)id='123']"/> I get the correct translation, for a '123'
that is.


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



<Prev in Thread] Current Thread [Next in Thread>