The value element
Release 2.0 - ...
When the value element appears as a child of element header, it is used to specify the value component of a header entry to be supplied to the submission protocol to be added to the preamble of a submission.
The value element may be used more than once in a given element header, in which case each value produces a new header entry.
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.
Example
XML | Copy Code |
---|---|
<xforms:model> <xforms:instance> <data> <header1 name="header1">headervalue1</header1> </data> </xforms:instance> <xforms:submission id="sub1" method="post" action="http://xformstest.org/cgi-bin/echo.sh"> <xforms:header> <xforms:name value="header1/@name" /> <xforms:value value="header1" /> </xforms:header> </xforms:submission> </xforms:model> |
Attributes
Name | Required / optional | Description |
---|---|---|
value | optional | Attribute containing an XPath 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 XPath string() function. An empty string is used if the XPath evaluation fails |
Content
The value element only allows inline text content.
Specification
Link to the XForms specification: the value element.