This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: access of a param


 How can access the value of a parameter, which is within some template...
The following example shows how the templates are called with parameters and how they are received at the called template..
note that the variable can be passed as a parameter to another template

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:template match="/">
<xsl:variable name="myVar" select="'1'"/>
<xsl:apply-templates select="/myroot/myElement">
<xsl:variable
<xsl:with-param name="myParam" select="$myVar"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="myElement">
<xsl:param name="myParam"/>
**Param Value**
<xsl:value-of select="$myParam"/><br/>
</xsl:template>
</xsl:stylesheet>

Hope this helps
Vasu

From: aruniima.chakrabarti@iflexsolutions.com
Reply-To: xsl-list@lists.mulberrytech.com
To: xsl-list@lists.mulberrytech.com
Subject: [xsl] access of a param
Date: Tue, 6 Aug 2002 19:59:53 +0530


Hello Everyone,
How can access the value of a parameter, which is within some template... I
am using recursive call to templates to calculate a value. I want to access
the value outside that template... how can I do so??? Please help...

Regards,
aruniima

----------------------------------------------------------------------------

This message contains privileged and confidential information and is
intended only for the individual named. If you are not the intended
recepient you should not disseminate, distribute, store, print, copy or
deliver this message. Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and immediately delete this e-mail from
your system.


E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses. The sender therefore does not accept
liability for any errors or omissions in the contents of this message which
arise as a result of e-mail transmission. If verification is required
please request a hard-copy version.


--------------------------------------------------------------------------

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




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]