11.4 Integer Deciders

Whenever the XML allows an integer decider (instead of a concrete integer), these are the valid options:

11.4.1 Binary Operations

All binary operations require <first> and <second> elements (which themselves could be deciders). The type of decider is dependent on the binary-operation attribute value.

11.4.1.1 Addition

The add binary operation string decider requires a integer decider for both the <first> and <second> elements. The result is the sum of the two numbers. To specify an add operation, use the "add" attribute value for the binary-operation attribute.

In this example, 60 is added to the "disk" component.

<calculate binary-operation="add">
 <first>
  <component id="disk" />
 </first>
 <second>60</second>
</calculate>

11.4.1.2 Multiply

The multiply binary operation string decider requires an integer decider for both the <first> and <second> elements. The result is the product of the two numbers. To specify multiplication operation, use the "multiply" attribute value for the binary-operation attribute.

11.4.2 Other Operations

Other operations require the operation attribute on the <calculate> element. The attribute value determines the type of operation.