XFA Specification
Chapter 2, Template Features for Designing Static Forms
Basic Layout
66
invisible
also prevents the container and its content from being displayed, however they still take up
space on the form.
When an outer container contains inner containers, and the outer container has a
presence
of
hidden
or
invisible
, the inner containers inherit the outer container’s
hidden
or
invisible
behavior
regardless of their own
presence
attribute values.
Concealing Containers Depending on View
A form designer may specify that containers in a form should be revealed or concealed depending on the
view. This feature uses a
relevant
attribute available on most template container elements and a
corresponding
relevant
element in the configuration syntax grammar (“Config
Specification” on
page 676).
Usually the
relevant
element in the configuration contains a single
viewname.
A viewname is an
arbitrary string assigned by the template creator. For example, the template creator might use the name
"print" to identify a view of the form to be used when printing a hard copy. Viewnames must not contain
space characters (U+0020) or start with the minus ("-") character (U+002D).
If a template container has no
relevant
attribute, or the value of the attribute is an empty string, then
the template container is included in all views. This is the default. However using the
relevant
attribute
any given template container may be explicitly included in or excluded from particular views. The content
of the
relevant
attribute is a space-separated list of viewnames, each of which may optionally be
prefixed with a "-". If a viewname is preceded by a "-" then the container is excluded from that particular
view; if not it is included in the view.
It is also possible for the
relevant
element in the configuration to specify a list of viewnames. In this case
the effect is to exclude any container which is excluded from
any
of the listed views.
When a container is excluded it and its content are removed from the XFA Template DOM so that as far as
the XFA processor is concerned it and its content do not exist. However if the template is subsequently
saved as an XML document the excluded container is retained in that document along with its
relevant
attribute and all of its content.
The following steps determine whether a container is included in or excluded from a particular view:
1. If the configuration
relevant
element is unspecified or empty, all containers are included, regardless
of their
relevant
attributes.
2. If the container’s
relevant
attribute is unspecified or empty, it is included regardless of the
configuration
relevant
element.
3. If the configuration specifies a non-empty
relevant
element, then every template container element
having a non-empty
relevant
attribute is evaluated for inclusion, as follows.
If the template element specifies a
relevant
value that includes a viewname that is
not
preceded
by "-" and is
not
specified in the configuration, the element is excluded.
If the template element specifies a
relevant
value that includes a viewname that
is
preceded by
"-" and
is
specified in the configuration, the element is excluded.
Otherwise the element is included.
The following table provides examples of the inclusion or exclusion of container elements based on the
template and config
relevant
values.
Home Index Bookmark Pages
Pages: Home Index All Pages