Skip to content

Calculations

Attributes

The calc element supports the following attributes:

Attribute Type Default Description
numberformat CalculateNumberFormat fractions Decides in what format numbers should appear in the output of this element. Can either be one of "fractions" or "decimals" or a value of the form "decimals n" where n is the number of places after the decimal separator that should be shown. Note that the later does not round, but cut off the number at the digit. For rounding to a specific digit, the round method of Nerdamer can be used.
simplify xs:boolean true Whether or not the result of the calculation should be simplified.
trailingzeros xs:boolean true Controls whether trailing zeros should be displayed when the numberformat attribute is set to display a fixed number of places.