Software Development XSLT: Conditional variable select and castable as October 2, 2013 Torleif 1 Comment Quick simple conditional select when creating a variable in XSLT 2.0. Also shows the castable as check. <variable name="id" select="if(id castable as xs:integer) then id else 0" />