XFA Specification
Chapter 7, Layout for Growable Objects
Flowing Layout for Containers
249
Assume that field
F
is very tall compared to the
contentArea
objects. Subform
E
overflows from
A
and
B
, then from
B
and
C
, and finally from
C
to
D
. Subform
Trailer
's occurrences are used up after the first
overflow, so it only appears at the bottom of
contentArea A
below the first fragment of
E
.
Leader
's
occurrences are used up after the second overflow, so it
appears at the top of
contentArea B
(
Leader[0]
) and
at the top of
contentArea C
(
Leader[1]
). The result is
shown at right.
Often leader and trailer subforms are placed in the
proto
section of the template (rather than under the root
subform) to prevent them from taking part in the merge
process. Alternatively leader and trailer subforms may be
made nameless or given a
scope
of
none
, either of which
also prevent them from participating in the merge
process. However if none of these things are done then
the leader or trailer subform may also appear in the Form
DOM bound to a node in the Data DOM. To accommodate
this the layout processor maintains its own occurrence
counts for leaders and trailers, separate from occurrence
counts used by the merge process. On the other hand if
the same subform is used both as a leader and a trailer, its
occurrence limit applies to the total of its appearances as
leader and as trailer.
Leader[0]
first part
of field F
A
second
part of
field F
B
Trailer[0]
Leader[1]
last part of
field F
third part
of field F
C
contentArea D
Effect of occurrence limits on leader and
trailer subforms
Overflow Leader/Trailer Lists
Both
overflowLeader
and
overflowTrailer
properties may have values which are space-separated
lists of target specifications. Each target specification that is an XML ID must start with the ’#’ character. All
other target specifications are interpreted as SOM expressions. The separator must be a single SPACE
(U0020) character.
Caution:
When the target specification is a SOM expression the expression must not include a SPACE
(U0020) character.
(Of course a target specification which is an XML ID must not contain a space either but this is already
forbidden by the XML specification
[XML1.0].)
Each target specification is (re)used as required until its maximum occurrence limit is reached, after which
the layout processor goes on to the next target specification in the list. A target specification may appear
in both lists; each use from either list counts towards its occurrence limit. It is pointless to put a target
specification more than once in the same list because for the second and subsequent appearances its
maximum occurrence limit will already have been exhausted. For example, a template includes the
following declarations:
<template>
Home Index Bookmark Pages
Pages: Home Index All Pages