xsl-list
[Top] [All Lists]

RE: [xsl]Local-Global Variable help

2006-08-30 04:11:53
If you want to create a local variable in template A, and use it in template B, and you call template B from template A, then you call template B with a parameter.

e.g.

<xsl:template match="...">
  <xsl:varable name="myvar" select="..."/>
  .
  .
  <xsl:call-template name="B">
     <xsl:with-param name="myparam" select="$myvar"/>
  </xsl:call-template>
</xsl:template>

<xsl:template name="B">
  <xsl:param name="myparam"/>

  .
  .
  .
</xsl:template>



From: <m(_dot_)core(_at_)aimconsulting(_dot_)it>

i need to create a variable in a template and call it in another template how it can be done?

i need to create the variable in the first template because i put in it something that i match so i cannot simply create that variable as global


_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--