[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl]Local-Global Variable help


Subject: RE: [xsl]Local-Global Variable help
From: "Colin Adams" <colinpauladams@xxxxxxxxxxx>
Date: Wed, 30 Aug 2006 12:11:35 +0100

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.core@xxxxxxxxxxxxxxxx>

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



Current Thread