[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

[Fwd: call-template with-param]

Subject: [Fwd: call-template with-param]
From: Martin Wiklund <pm-w@xxxxxxx>
Date: Mon, 15 Dec 2003 09:13:54 +0100
call template with param
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.