title: XSL how to avoid NaN
body: <p>I have several attributes which contain numbers. But one of them or several (or even every) may not be defined (i.e. no such attr in xml-file). I need to display sum of attrs, so when at least one of them is undefined I get NaN. </p>
  
  <p>So how can I avoid getting NaN? I mean I need to interpret NaN value as 0, like NaN + 10 + 20 + NaN + 30 should give me 60 as result, but not NaN 
  Is it any way to avoid NaN result without conditions, just like var||0 in JS will return 0 if var is undefined?</p>
  
  <p>Example of xml element. I need to sum every attr (attr3 is undefined)</p>
  
  <pre><code>&lt;element attr1 = "5" attr2 = "1"/&gt;
  </code></pre>
  
  <p>Example of xsl sum </p>
  
  <pre><code>&lt;xsl:value-of select="@attr1 + @attr2 + @attr3"/&gt;
  </code></pre>