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 0
.
In other words, is there a simple equivalent of the following in XSLT?
var foobar = is_numeric(element value) ? element value : 0
Or how would you write this?
<xsl:variable name="foobar" select=" ? " />