The header element

Release 2.0 - ...

The header element can be used to contribute information to the preamble of a submission in a manner appropriate to the protocol.

The submission element can contain zero or more header child elements. Each produces zero or more header entries containing a name, a value, and a combination. The entries are provided to the submission protocol in the specified order.

If the header element does not contain a nodeset attribute, then one header entry is created for each value element. If the header element contains a nodeset attribute, then for each selected node, one header entry is created for each value element.

The name and value of the header entry are obtained from the required child elements name and value. If the name obtained from the name element is the empty string, then the header entry is omitted.

 

Example

XML CopyCode image Copy Code
<xforms:submission id="sub1" method="post" action="http://xformstest.org/cgi-bin/echo.sh">
   <xforms:header>
      <xforms:name>myHeader1</xforms:name>
      <xforms:value>myValue1</xforms:value>
   </xforms:header>
   <xforms:header>
      <xforms:name>myHeader2</xforms:name>
      <xforms:value>myValue2</xforms:value>
   </xforms:header>
</xforms:submission>

Attributes

Name Required / optional Description
nodeset optional Attribute containing an XPath expression to evaluate using the in-scope evaluation context.
One or more header entries are generated for each node selected by this attribute.
combine optional Attribute defaulting to append and with legal values of append, prepend, and replace.
This attribute controls the method of combination for entries produced by this element header with other entries produced by other header elements.

Content

The header element requires name and value child elements (order independent).

Specification

Link to the XForms specification: the header element.

Topics