The resource element

Release 2.0 - ...

The resource element allows the URI used for a submission to be dynamically calculated based on instance data.

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.

Example

XML CopyCode image Copy Code
<xforms:submission method="post"> 
    <xforms:resource value="instance('params')/anyURI"/> 
</xforms:submission>

Attributes

Name Required / optional Description
value optional Attribute containing an XPath 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 XPath string() function.
An empty string is used if the XPath evaluation fails

Content

The resource element only allows inline text content.

Specification

Link to the XForms specification: the resource element.