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

Re: Specifying the <submission> element

From: Mikko Honkala <honkkis@tml.hut.fi>
Date: Thu, 09 Jan 2003 15:11:13 +0200
Message-ID: <3E1D74F1.9050106@tml.hut.fi>
To: www-forms@w3.org
CC: Bob Smith <gordongano99@yahoo.com>

Hi,

(1) the spec says: (3.3.3 The submission Element)

"ref : Optional selector binding expression enabling submission of a 
portion of the instance data. The selected node, and all descendants, 
are selected for submission."

also (11.1 The xforms-submit Event):

"A node from the instance data is selected, based on the attribute ref 
on element submission. This node and all relevant child nodes are 
considered for the remainder of the submit process."

So the root node will be the node referenced by the XPath expression in 
ref.

In your specific case (<submission ref="/a/b/c" .../>), the submission 
would be

<c>widget</c>


(2)

Yes, you should use the instance('id') function:
<submission ref="instance('id') .../>"

-mikko


Bob Smith wrote:
> (1) The "ref" attribute lets you specify a subtree of
> the instance data, but it doesn't say exactly how it's
> submitted. E.g. if my ref value is "/a/b/c", then will
> "c" be the top level node or will "a"?
> 
> (2) Maybe I've missed it, but how do you specify which
> instance data to submit? Do you have to put an
> instance() function call in the ref attribute? It
> would be nice if this were clearer in the spec.
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
Received on Thursday, 9 January 2003 08:10:38 GMT

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