title: Conditional variable select in XSLT
body: <p>I want a variable to have the value of an element if the value is numeric, but if it's not then I want the variable to have the value <code>0</code>.</p>
  
  <p>In other words, is there a simple equivalent of the following in XSLT?</p>
  
  <pre><code>var foobar = is_numeric(element value) ? element value : 0
  </code></pre>
  
  <p>Or how would you write this?</p>
  
  <pre><code>&lt;xsl:variable name="foobar" select=" ? " /&gt;
  </code></pre>