I want to show decimal inputs like 100.1, 100.0 in a different format from integer inputs like 100 I have used the following check for identifying decimals(The variable input is of numeric type)
<xsl:when test="not(floor($input) = $input)">
It works for cases like 100.1 but it does not work for cases like 100.00, this would return false saying that this is not a decimal. I have then tried to use
<xsl:when test="$input castable as xs:decimal">
This is would not work for integers like 100 as the check would return true. I tried
<xsl:when test="$input instance of xs:decimal">
for which I am getting false for values like 100.50, not sure why. Is there any other way I can solve this?