XForms Elements that take the value attribute

Name value content alternatives in priority order overrides overridden by
function/result Contains the expression which specifies the result of the function. no content! <function ...>...<result value="'foo'"/></function>

submission/resource Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. To obtain the URI, the result of the expression is processed as if by call to the string conversion function as described in the expression module. An empty string is used if the evaluation fails. Content: PCDATA

The URI to be used by the submission can be specified with either the value attribute or the string content of the resource element. If both are specified, then the value attribute takes precedence. If the submission does not have a resource child element, then the submission URI is obtained from the resource attribute or the action attribute.

<submission><resource value="'foo'"/></submission>

<submission><resource>foo</resource></submission>

<submission resource="foo"/>

<submission action="foo"/>

content ?@resource ?@action
submission/method Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. To obtain the method, the result of the expression is processed as if by call to the string conversion function as described in the expression module. An empty string is used if the evaluation fails. Content: PCDATA

The method to be used by the submission can be specified with either the value attribute or the string content of the method element. If both are specified, then the value attribute takes precedence. If the submission does not have a method child element, then the submission method is obtained from the method attribute.

<submission><method value="'post'"/></submission>

<submission><method>post</method></submission>

<submission method="post"/>

content

?../@method

submission/header Author-optional string expression; this attribute overrides all value child elements present; <submission><header name="foo" value="'bar'"/></submission>

<submission><header name="foo"><value value="'bar'"/></header></submission>

<submission><header name="foo"> <value>bar</value></header></submission>

value child elements
submission/header/name Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. To obtain the header name, the result of the expression is processed as if by call to the string conversion function as described in the expression module. An empty string is used if the evaluation fails. The header entry name may be given by the string content of the name element, or by the result of the value attribute. If both are given, the result from the value attribute takes precedence. If the resulting name is the empty string, then the entry is considered to be void, and it is not supplied to the submission protocol.

<submission><header value="'bar'"><name value="'foo'"/></header></submission>

<submission><header value="'bar'"><name>foo</name></header></submission>

<submission><header name="foo" value="'bar'"/></submission>

content
submission/header/value Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. To obtain the header entry value, the result of the expression is processed as if by call to the string conversion function as described in the expression module. An empty string is used if the evaluation fails. The header entry value may be given by the string content of the value element, or by the result of the value attribute. If both are given, the result from the value attribute takes precedence. <submission><header name="foo"><value value="'bar'"/></header></submission>

<submission><header name="foo"> <value>bar</value></header></submission>

content
output Author-optional. An expression to be evaluated. The string result of the evaluation is rendered by the form control. If binding attributes are present to select a node, this attribute has no effect. The evaluation context is the same as would be applied to the evaluation of the Single Item Binding. This expression is re-evaluated whenever there is a change in any node to which the expression refers. An empty string is used if the evaluation fails. <output value="'foo'"/> binding
output/mediatype An expression to be evaluated. The string result of the evaluation is used to specify the desired media type for output rendition. If a Single Item Binding is expressed, then this attribute has no effect. The evaluation context is the same as would be applied to the evaluation of the Single Item Binding. An empty string is used if the evaluation fails.

No content!

<output><mediatype value="'text/plain'"/></output> ../@mediatype binding
item Author-optional. An expression to be evaluated. The string result of the evaluation is used as the storage value of the item when it is selected. If a Single Item Binding is expressed, then this attribute has no effect. The evaluation context is the same as would be applied to the evaluation of the Single Item Binding. An empty string is used if the evaluation fails. <item ref="foo"/>

<item value="'foo'"/>

<item><value value="'foo'"/></item> (I think)

<item><value>foo</value></item>

binding
item/value Author-optional. An expression to be evaluated. The string result of the evaluation is used as the storage value of the item when it is selected. If a Single Item Binding is expressed, then this attribute has no effect. The evaluation context is the same as would be applied to the evaluation of the Single Item Binding. An empty string is used if the evaluation fails. <item><value value="'foo'"/></item>

<item><value>foo</value></item>

content? binding
itemset (Not yet added)
action/param The optional value attribute specifies an XPath expression returning the value of the parameter to pass to the script. The value can be any sequence of items but is converted to a value compatible with the script type as needed. The value of the parameter can either be specified by the value attribute or as inline text. The value attribute has precedence over the inline text. <action><param value="'foo'"/></action>

<action><param>foo</param></action>

content
setvalue Author-optional attribute containing an expression to evaluate, with the result stored in the selected instance data node. The evaluation context for this expression is the result from the Single Item Binding. To obtain the value, the result of the expression is processed as if by call to the string conversion function as described in the expression module. An empty string is used if the evaluation fails. The element content of setvalue specifies the literal value to set; this is an alternative to specifying a computed value via attribute value. If neither a value attribute nor text content are present, the effect is to set the value of the selected node to the empty string (""). If both are present, the value attribute is used. <setvalue value="'foo'"/>

<setvalue>foo</setvalue>

content
toggle/case Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. To obtain the case identity, the result of the expression is processed as if by call to the string conversion function as described in the expression module. An empty string is used if the evaluation fails. Content: PCDATA

The case to be selected by the toggle action is given by the case attribute or the case element. If both are given, the element takes precedence. Due to the addition of the element, the case attribute is no longer required, but either the case attribute or the case element must appear. The case element can provide the identity of a case with either its string content or the value attribute. If both are given, then the value attribute takes precedence.

<toggle><case value='"foo'"/></toggle>

<toggle><case>foo</case></toggle>

<toggle case="foo"/>

content

../@case

type info?

setfocus/control Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. To obtain the desired element identifier, the result of the expression is processed as if by call to the string conversion function as described in the expression module. An empty string is used if the evaluation fails. Content: PCDATA

The identity of the element to which the setfocus action dispatches xforms-focus is given by the control attribute or the control element. If both are given, the element takes precedence. Due to the addition of the element, the control attribute is no longer required, but either the control attribute or the control element must appear. The control element can provide the desired element identifier with either its string content or the value attribute. If both are given, then the value attribute takes precedence.

<setfocus><control value="'foo'"/></setfocus>

<setfocus><control>foo</control></setfocus>

<setfocus control="foo"/>

content

parent @control

dispatch/name Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. To obtain the event name, the result of the expression is processed as if by call to the string conversion function as described in the expression module. An empty string is used if the evaluation fails. Content: PCDATA

The event name of the dispatch action is given by the name attribute or the name element. If both are given, the element takes precedence. The name element can provide the event name with either its string content or the value attribute. If both are given, then the value attribute takes precedence.

<dispatch><name value="'foo'"/></dispatch>

<dispatch><name><foo</name></dispatch>

<dispatch name="foo"/>

content

doesn't say about ../@name

dispatch/targetid Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. To obtain the event target, the result of the expression is processed as if by call to the string conversion function as described in the expression module. An empty string is used if the evaluation fails. Content: PCDATA

The event target of the dispatch action is given by the targetid attribute or the targetid element. If both are given, the element takes precedence. The targetid element can provide an IDREF for the event target with either its string content or the value attribute. If both are given, then the value attribute takes precedence.

<dispatch><targetid value="'foo'"/></dispatch>

<dispatch><targetid>foo</targetid></dispatch>

<dispatch targetid="foo"/>

../@targetid

content

dispatch/delay Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. To obtain the event delay, the result of the expression is processed as if by call to the string conversion function as described in the expression module. If the result does not conform lexically to xs:nonNegativeInteger, then the result of empty string is used. An empty string is used if the evaluation fails. Content: PCDATA

The event delay of the dispatch action is given by the delay attribute or the delay element. If both are given, the element takes precedence. The delay element can provide the delay with either its string content or the value attribute. If both are given, then the value attribute takes precedence.

<dispatch><delay value="0"/></dispatch>

<dispatch><delay>0</delay></dispatch>

<dispatch delay="0"/>

../@delay

content

dispatch/property The optional value attribute specifies an XPath expression returning the context information to pass. The value can be any sequence of items. The value of the extra context information can either be specified by the value attribute or as inline text. The value attribute has precedence over the inline text. <dispatch><property value="'foo'"/></dispatch>

<dispatch><property>foo</property></dispatch>

content
load/resource Author-optional attribute containing an expression to evaluate using the in-scope evaluation context. To obtain the URI, the result of the expression is processed as if by call to the string conversion function as described in the expression module. An empty string is used if the evaluation fails. Content: PCDATA

The URI to be used by the load can be specified with either the value attribute or the string content of the resource element. If both are specified, then the value attribute takes precedence. If the load does not have a resource element as its first child, then the URI is obtained from the resource attribute or the Single Item Binding, if given.

<load><resource value="'foo'"/></load>

<load><resource>foo</resource></load>

<load resource="foo"/>

content

../@resource