Specifies an XPath expression that determines the context in which the control will be selectable and its actions enabled.
The container attribute is an optional attribute of the xmlToEdit element.
If the current context (view selection or insertion point) is within some HTML element that maps back to an XML Document Object Model (DOM) node that satisfies the container XPath expression, the control is enabled. Otherwise, all actions are disabled.
It does not suffice for the container XML DOM node to exist. Actions will be enabled only when the current selection is within an HTML element that maps to the container XML DOM node.
|In Microsoft Office InfoPath 2007 design mode, generated XPath expressions for the item and container attributes will always be in the form |
, which provides the full path from the root element of the form's underlying XML document. But patterns such as
, or with predicates as in
are allowed if the form definition (.xsf) file is edited manually.
The following is an example of the container attribute as it is used in the xmlToEdit element: