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

xsl:with-param ??

Subject: xsl:with-param ??
From: longjohn <longjohn@xxxxxxxxxxxx>
Date: Mon, 29 Apr 2002 10:28:26 +0200
xsl with param not allowed
(READ TILL THE END PLEASE)

First problem :

How to pass a parameter from a CHILD template to another template?

Example:
<xsl:template match="/" >
... <xsl:apply-templates select="/root/TEMP1"/>
</xsl:template>


<xsl:template match="TEMP1" >
...
   <xsl:variable name="var" value="TEM"/>
       <xsl:call-template name="TEMP2"/>
</xsl:template>

<xsl:template match="TEMP2" >
<xsl:value-of select="$var"/>   <!-- $var not found !!!!!! -->
.....

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

Jamal has replied :

Try this:

<xsl:template match="/" >
... <xsl:apply-templates select="/root/TEMP1"/>
</xsl:template>
<xsl:template match="TEMP1" >
...
<xsl:variable name="var" value="TEM"/>
<xsl:call-template name="TEMP2">
<xsl:with-param name="your_parameter_name" select="$var"/>
</call-template>
</xsl:template>


<xsl:template match="TEMP2" >
 <xsl:param name="your_paramter_name"/>
 <xsl:value-of select="your_parameter_name"/>
</template>

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

But now i've got 2 errors :
1- 'value' not allowed in xsl:variable
2- 'xsl:with-param' not allowed in this position of the style-sheet

Help me please.
Thanks


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.