XpressDox Help Center

Use Google To Find Help Fast, e.g. xpressdox choosefromlist

Press Getting Started in the XpressDox toolbar for basic template development
Watch the tutorial videos
View command help from list of commands
Press F1 for help on a command in the Command Editor
Email support@xpressdox.com for assistance

The ceiling and floor functions

The ceiling and floor functions

These are two XSLT functions and so have been available since the inception of XpressDox, but have recently been added to the Command Editor.  In essence, they perform the equivalent of a “round up” (ceiling) and “round down” (floor) to the nearest integer.

For example, if the value 25 has been captured into data element Amount, then

«ceiling(RegionToX(Amount) div 3)»

will output the value 9


«floor(RegionToX(Amount) div 3)»

will output 8.

Note the use of the RegionToX function – this is because the ceiling and floor functions are XSLT functions and thus need an XSLT-compliant number format passed to them. So if you are in a region where your regional settings indicate a decimal character other than ‘.’ (period or full-stop), and you know that Amount will conform to those regional settings, then the RegionToX function needs to be employed. More on this at: Handling calculations and Regional Settings in XpressDox.

Leave a Reply