W3C home > Mailing lists > Public > www-forms@w3.org > May 2003

setvalue behavior

From: Dueck, Brian <bdueck@metasolv.com>
Date: Fri, 9 May 2003 06:34:26 -0400
Message-ID: <E8F1B37FC20ED74BAC2685B05C799714C6E244@srvtoemail.metasolv.com>
To: "'www-forms@w3.org'" <www-forms@w3.org>

Hello;

Hoping someone can clarify the intended behavior for setvalue.

Specifically, what should setvalue do if the single node specified by the
ref or bind element does not yet exist.

For example, suppose I have an instance:

<xf:instance id="customer">
   <customer>
      <name>John Doe</name>
   </customer>
</xf:customer>

and I have a setvalue element like this:

<xf:setvalue ref="instance('customer')/address">123 Main
Street</xf:setvalue>

Since there is no <address> element for customer, what is setvalue supposed
to do?

Is it supposed to create a new <address> element and create a child text
node with the specified value (123 Main Street). Or, is this a bind error of
some sort?

Ideally, I'd like to see setvalue create a new element and set the content
to be whatever "value" is specified by setvalue.

But, if that's not what setvalue is supposed to do, perhaps someone can
point me to an alternate way of accomplishing the same thing through XForms.

Thanks,

Brian.
Received on Friday, 9 May 2003 06:47:01 GMT

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