title: applying template using variable in XSLT
body: <p>what is the best way to apply a template according to a variable in xslt? the variable will change through a java script code. i have read about the function in xslt v 2.0 but the answer was not explained very well and it didn't match my requires.
  <br/>
  i've tried the next:
  <br/>
  i've created a global variable</p>
  
  <pre><code>&lt;xsl:variable name="module" select='"C"' /&gt;
  </code></pre>
  
  <p>then applied it like this</p>
  
  <pre><code>&lt;xsl:apply-templates select='module[@name="$module"]/categorys' /&gt;
  </code></pre>
  
  <p>then matched it like this</p>
  
  <pre><code>&lt;xsl:template match='module[@name="C"]/categorys'&gt;
  </code></pre>
  
  <p>but nothing displayed.</p>