<instance> <clock xmlns=""> <time/> </clock> </instance> <bind ref="time" calculate="local-dateTime()"/> ... <output ref="time" label="time"/>
<instance> <clock xmlns=""> <time/> </clock> </instance> <bind ref="time" calculate="local-dateTime()"/> ... <output ref="time" label="time"/>
<clock xmlns=""> <time/> <h/><m/><s/> </clock> ... <bind ref="h" calculate="substring(../time, 12, 2)"/> <bind ref="m" calculate="substring(../time, 15, 2)"/> <bind ref="s" calculate="substring(../time, 18, 2)"/> ... ... <output value="concat(h, ':', m, ':', s)"/>
<clock xmlns=""> <time/> <h/><m/><s/> </clock> ... <bind ref="h" calculate="substring(../time, 12, 2)"/> <bind ref="m" calculate="substring(../time, 15, 2)"/> <bind ref="s" calculate="substring(../time, 18, 2)"/> ... ... <output value="concat(h, ':', m, ':', s)"/>
<action ev:event="xforms-ready"> <dispatch name="tick" targetid="model"/> </action>
When XForms starts up a tick
event is sent to the model
<action ev:event="xforms-ready"> <dispatch name="tick" targetid="model"/> </action> <action ev:event="tick"> <setvalue ref="time" value="local-dateTime()"/> <dispatch name="tick" targetid="model" delay="1000"/> </action>
A tick event causes the value of time
to be updated, and a new
tick
event to be sent to the model (delayed by 1 second).
This is the only change.
<action ev:event="xforms-ready"> <dispatch name="tick" targetid="model"/> </action> <action ev:event="tick"> <setvalue ref="time" value="local-dateTime()"/> <dispatch name="tick" targetid="model" delay="1000"/> </action>
A tick event causes the value of time
to be updated, and a new
tick
event to be sent to the model (delayed by 1 second).
This is the only change.
<instance> <clock xmlns=""> <time/> <h/><m/><s/> <hand length="30" class="h"/> <hand length="40" class="m"/> <hand length="40" class="s"/> </clock> </instance> <bind ref="hand[@class='s']" calculate="../s * 6"/> <bind ref="hand[@class='m']" calculate="../m * 6"/> <bind ref="hand[@class='h']" calculate="(../h mod 12)*30 + (../m div 2)"/>
<svg ...> <circle r="45" class="bezel"/> <xf:repeat ref="hand"> <line x1="0" y1="0" x2="0" y2="-{@length}" transform="rotate({.})" class="{@class}"/> </xf:repeat> <circle r="2" class="centre"/> </svg>
<svg ...> <circle r="45" class="bezel"/> <xf:repeat ref="hand"> <line x1="0" y1="0" x2="0" y2="-{@length}" transform="rotate({.})" class="{@class}"/> </xf:repeat> <circle r="2" class="centre"/> </svg>
<svg ...> <circle r="45" class="bezel"/> <xf:repeat ref="hand"> <line x1="0" y1="0" x2="0" y2="-{@length}" transform="rotate({.})" class="{@class}"/> </xf:repeat> <circle r="2" class="centre"/> </svg>