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

Re: template value input

Subject: Re: template value input
From: Mukul Gandhi <mukulw3@xxxxxxxxx>
Date: Wed, 17 Sep 2003 10:10:09 -0700 (PDT)
xsl with param example
I just tried to construct two examples for the same --

<!--example 1; xsl:call-template returns something,
which is stored in a variable -->
  <xsl:variable name="temp1">
     <xsl:call-template name="TEMP1">
	<xsl:with-param name="param">abc</xsl:with-param>
	</xsl:call-template>
  </xsl:variable>

  <!-- this xsl:call-template uses the value of
previous call to a template, in select="" clause -->
  <xsl:call-template name="TEMP1">
    <xsl:with-param name="param" select="$temp1"/>
  </xsl:call-template>
		
<!--example 2 -->
  <xsl:variable name="temp2">
    <xsl:call-template name="TEMP2">
       <xsl:with-param
name="param">123</xsl:with-param>
    </xsl:call-template>
  </xsl:variable>

  <xsl:call-template name="TEMP2">
    <xsl:with-param name="param" select="$temp2"/>
  </xsl:call-template>		
	
  <xsl:template name="TEMP1">
     <xsl:param name="param"/>
       <xsl:value-of select="$param"/>
  </xsl:template>
	
  <xsl:template name="TEMP2">
    <xsl:param name="param"/>
      <a>
        <xsl:value-of select="$param"/>
      </a>
  </xsl:template>

example 1 uses a very simple xsl:with-param. example 2
uses a slightly different value for xsl:with-param..
There can be other possible ways also to define
<xsl:with-param name="param" select="" />

Depends what the real problem is..

Regards,
Mukul


--- clemens schrenk <clemens.schrenk@xxxxxxx> wrote:
> how can i insert the outcome of a template into
> another template at the
> place of the word space ?
> <xsl:with-param name="text" select="space"/>
> 
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

 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.