title: apply the whole template or template parts depending on the condition
body: <p>I have the template</p>
  
  <pre><code>&lt;xsl:template match="node" mode="some_mode"&gt;
      &lt;xsl:value-of select="child1" /&gt;
      &lt;xsl:value-of select="child2" /&gt;
      &lt;xsl:value-of select="child3" /&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>I want to apply the template so it would select all the nodes specified in the template in one case like this</p>
  
  <pre><code>&lt;xsl:apply-templates select="node" mode="some_node" /&gt;  &lt;!-- select all inside the node tag  --&gt;
  </code></pre>
  
  <p>and in another case I want to limit the output and for example not to select &lt;child1&gt; or &lt;child2&gt; nodes. Can I do it with a variable or a param? Or do I have to write another template from scratch?</p>
  
  <pre><code>&lt;xsl:apply-templates select="node" mode="some_node" /&gt;  &lt;!-- select only some tags from the node tag  --&gt;
  </code></pre>
  
  <p>In other word I will use this templates several times and I want to contorl the output when applying. I can define the variable, but the documentation says that I can't change the value of a variable once it was defined. Probably the param will wrok but I'm not good with it.</p>