The resource element child of the load element

Release 2.0 - ...

When it appears as the first child element of load, the resource element provides the URI of the link, overriding the resource attribute.

This element allows the URI used by the load to be dynamically calculated based on instance data.

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 Node Binding, if given.

Example

XML CopyCode image Copy Code
<xforms:trigger>
   <xforms:label>Go To The XForms 1.1 Spec</xforms:label>
   <xforms:action ev:event="DOMActivate">
      <xforms:load>
         <xforms:resource value="'http://www.w3.org/TR/xforms11/'" /
      </xforms:load>
   </xforms:action>
</xforms:trigger>

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 child of the load element.