title: Passing XSLT variable from a XSL to another called by a call-template
body: <p>I have 2 files.</p>
  
  <p>1->index.xsl</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
  
      &lt;!-- Includes --&gt;
      &lt;xsl:include href="navigation.xsl" /&gt;
      &lt;xsl:include href="head.xsl" /&gt;
  
      &lt;xsl:template match="/"&gt;
  
      &lt;!-- WANT TO PASS THIS VARIABLE TO navigation.xsl--&gt;
      &lt;xsl:variable name="value" select="1"/&gt;
      &lt;!-- WANT TO PASS THIS VARIABLE TO navigation.xsl--&gt;
  
      &lt;html&gt;
          &lt;head&gt;
              &lt;!-- Basic --&gt;
              &lt;xsl:call-template name="HtmlBasicHead"/&gt;
              &lt;!-- Seo --&gt;
              &lt;title&gt;Impress&lt;/title&gt;
              &lt;meta name="description" content="..." /&gt;
              &lt;meta name="keywords" content="..." /&gt;
          &lt;/head&gt;
  
          &lt;body&gt;
              &lt;div id="main"&gt;
  
                  &lt;xsl:call-template name="Header"/&gt;
  
                  &lt;xsl:call-template name="NavigationMenu"/&gt;
  
              &lt;/div&gt;
          &lt;/body&gt;
      &lt;/html&gt;
  
      &lt;/xsl:template&gt;
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>2->navigation.xsl
  </p>
  
  <pre><code>&lt;xsl:template name="NavigationMenu"&gt;
      &lt;!-- NAVIGATION MENU BEGIN --&gt;
      &lt;div id="tray"&gt;
      &lt;ul&gt;
          &lt;xsl:if test="$value='1'"&gt;
          VALUE IS 1
          &lt;/xsl:if&gt;
  
          &lt;li id="tray-active"&gt;&lt;a href="#"&gt;Homepage&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Live demo&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;About product&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Testimonials&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Download&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Purchase&lt;/a&gt;&lt;/li&gt;
  
      &lt;/ul&gt;
      &lt;!-- NAVIGATION MENU END --&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p></p>
  
  <p>What im trying to do is to declare the variable in index.xsl , and still use it in navigation.xsl trough call-template, because i'm getting an error like "Variable 'value' has not been declared. " ....</p>
  
  <p>The reason im doing this is because i need to specify what button should be highlighted.</p>
  
  <p>Thank you!</p>