title: xsl:call-template: return a number rather than text to be assigned to a variable
body: <p>I'm having a (minor) problem here. I'm calling a named template and am assigning the outcome to a variable. So for so good, but I need the type of the processed template's return value to be integer rather than text.</p>
  
  <p>I wonder if there's a way to achieve that without having to go with a temporary variable?</p>
  
  <p>Here's some sample code:</p>
  
  <pre><code>&lt;xsl:variable name="tmp"&gt;
      &lt;xsl:call-template name="mytemplate"&gt;
          &lt;xsl:with-param name="x" select="123"/&gt;
      &lt;/xsl:call-template&gt;
  &lt;/xsl:variable&gt;
  
  &lt;xsl:variable name="myvar" select="number($tmp)"/&gt;
  
  &lt;xsl:template name="mytemplate"&gt;
      &lt;xsl:param name="x"/&gt;
      &lt;xsl:value-of select="$x"/&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>Don't mind the code as it is an oversimplification of what my template does. Notice also that I've tried to return <code>&lt;xsl:value-of select="number($x)"/&gt;</code> but to no avail.</p>
  
  <p>Any help is heavily appreciated.
  TIA</p>