18. Event handling

When the time zone changes, the 24-hour flag may also need changing. (West of Greenwich: false; east: true.)

In principle, it's simple:

  <xf:setvalue ev:event="xforms-value-changed"
             ref="instance('ui')/@clock24"
             value="if(../tz/@sign = '-', 'true', 'false')"/>

In practice, it's more complicated. (Details in paper.)