XFA Specification
Chapter 7, Layout for Growable Objects
Flowing Layout for Containers
236
… content …
[pageArea (E[1])]
[contentArea (F)]
… content …
[pageSet (A[1])]
[pageArea (B)]
[contentArea (C)]
… content …
Assuming that the last content is used up without filling this latest
contentArea
(which could be called
A[1].B.C
), the resulting document would consist of four display surfaces. (If rendered and printed
single-sided at this point it would come out of the printer as four sheets of paper, with each sheet having
printing on one side.)
In the example above only the amount of data limits the number of surfaces. However had the maximum
occurrence limit for
pageSet A
been a positive number, the layout processor could have exhausted it.
When this occurs the layout processor stops adding content, and it is recommended to issue a warning
message. It does not traverse to another
pageSet
, even if there is one. The template syntax allows other
pageSet
objects to exist but they may not be used for this purpose.
The maximum occurrence limit on the
pageSet
is likely to be used as a safety-valve to prevent the
accidental generation of huge print runs. However it may also be used to intentionally extract just the first
portion of a document. For that reason, when the limit is reached, the layout processor should preserve
the Layout DOM so that the content laid out to that point can be rendered.
The value of the maximum occurrence limit for a
pageSet
or
pageArea
must be either -1, which signifies
no limit, or a positive (i.e. one or greater) decimal integer. If not supplied it defaults to -1.
Note that subforms may also have maximum occurrence values, but those are used only in the data
binding (merge) process; they have no effect on the layout processor. See the
“Basic Data Binding to
Produce the XFA Form DOM” on page 154
for more information about minimum and maximum
occurrence values for subforms.
Error Condition: Exhaustion of pageArea Occurrences
If all available
pageSet
and
pageArea
objects have maximum occurrence properties that are not equal
to -1, there is a limit to how many
pageArea
objects can be included in the layout. When the last
pageArea
within this limit has been laid out, the layout processor stops processing. If there is more
content that has not yet been laid out, the additional content is discarded. However the layout processor
has no way of knowing whether the situation arose deliberately or as a result of an accidental mismatch
between the template and the user data. Hence the layout processor should issue a warning but retain the
pages laid out up to that point in the Layout DOM for rendering.
Minimum Occurrence Limits
Minimum occurrence properties on
pageSet
and
pageArea
objects force the layout processor to
incorporate one or more copies of the associated object into the Layout DOM when descending through
the node, even if no content is put into it. The default minimum occurrence property is 0. When the
minimum occurrence property is greater than 1 the layout processor creates the specified number of
siblings and then descends into the leftmost (eldest) of the new sibling nodes. The other siblings are used
later if an empty container is needed, rather than creating another sibling. For example, suppose a
template contains the following declarations:
<pageSet name="A">
<occur min="2"/>
<pageArea name="B">
Home Index Bookmark Pages
Pages: Home Index All Pages