I want the variable to have an element value if the value is numeric, but if it is not, I want the variable to have a value of 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 do you write it?
<xsl:variable name="foobar" select=" ? " />
source share