W3C home > Mailing lists > Public > www-forms@w3.org > March 2004

Svar: Using now() function in instance data

From: David Landwehr <DLandwehr@novell.com>
Date: Thu, 18 Mar 2004 15:19:42 +0100
Message-Id: <s059b014.041@emea1-mh.id2.novell.com>
To: <gary@deltagreen.co.uk>, <www-forms@w3.org>

Hi Gary,

You could do:

  <xforms:model>
    <xforms:setvalue ref="/point to yout xsd:date node" value="now()"
ev:event="xforms-ready"/>

Then the node will be updated after the external source has been read
and the node will be editable from the UI. If the node should have the
now() value staticly you could make a bind

  <xforms:bind nodeset="/point to yout xsd:date node"
calculate="now()"/>

The it will always have the datetime from when the latest xforms-rebuild
event occured.

Best regards,
David

>>> Gary Stewart <gary@deltagreen.co.uk> 18-03-04 7:11 >>>

I've been attempting to use the now() function to populate an element
with
today's date, however the instance data is loaded from an external
source
and I can't seem to set it so that as the data is read in the now
function
is invoked and the xsd:date is populated with the current date.

Is there something obvious I'm missing?

Thanks,

Gary
Received on Thursday, 18 March 2004 09:20:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:57 GMT