saxon:is-whole-number

Tests whether the input is a whole number.

is-whole-number($arg as numeric?) ➔ xs:boolean

Arguments

 

$arg

numeric?

The input number

Result

xs:boolean

Namespace

http://saxon.sf.net/

Notes on the Saxon implementation

Available since before Saxon 8.0.

Details

This function takes a number as input and returns true if the number has no fractional part, that is, if it is equal to some integer. If an empty sequence is supplied, the function returns false.

This function is provided largely because it is used internally by the Saxon optimizer.

The following example will return true:

saxon:is-whole-number(12e0)