XFA Specification
Chapter 6, Template Features for Designing Forms with Repeating Sections
Forms with Repeated Fields or Subforms
216
without limit. In this case the layout processor stops adding new pages or sequences of pages only when it
runs out of subforms to lay down.
A pure boilerplate
pageArea
is a
pageArea
element that does not contain any
contentArea
elements.
A pure boilerplate
pageArea
must not have a maximum occurrence limit of -1 (whether by defaulting or
supplied explicitly). This is because, should the layout processor find its way into such a
pageArea
, it
logically should execute an infinite loop emitting pages. This is anti-social behavior and templates are
forbidden to do this. For the same reason, a
pageSet
element that contains only pure boilerplate
pageArea
elements must not have a value of -1 for its maximum occurrence property. However it is
anticipated that layout processors will encounter some templates that are not conforming in one of these
ways. It is recommended that in such a case the layout processor emit a warning and proceed as though
the value of the offending
max
attribute was 1. In subsequent processing this could lead to the layout
processor using up all allowed occurrences and quitting prematurely, which is annoying but safe behavior.
One might ask why
contentArea
objects do not have
occur
properties. There would be no point,
because each instance of the
contentArea
would occupy the same position upon the page. By contrast
each instance of a
pageArea
represents a unique display surface and each instance of a
pageSet
represents a unique set of display surfaces.
Break Conditions
In XFA pieces of displayable content are not tied directly to particular content areas or pages. Instead each
subform has a
breakBefore
property which controls what the layout processor does when it is about to
lay down that subform. It also has a
breakAfter
property which controls what it does after it lays down
the subform.
In the kind of form described in this chapter (a static form using purely positioned layout), the
targetType
subproperty of the
breakBefore
property for each subform is usually set to
contentArea
. This causes the layout processor to place each subform into the next available content
area on the current page. If there are no more content areas on the page, the layout processor moves on to
the next page and uses the first content area on that page. When the
pageArea
objects in the current
page set are used up, it moves on to the first content area of the first page of the next page set.
pageSet
elements can nest to any level. The layout processor maintains a count of instances used for each page set
and, when the count is exhausted, ascends a level in the template looking for an unused page set. When it
has exhausted the last page set, or if it runs out of displayable entities to lay down, it stops.
The
targetType
subproperty of a
breakBefore
property can also be set to the value
pageArea
. This
causes the layout processor to treat the current page as though all of its
contentArea
regions have been
used. It advances to the first content area of the next page without putting anything more on the current
page. Using this a single
pageArea
can be used to accommodate more or fewer subforms, depending
upon the type of subform.
The
breakBefore
or
breakAfter
property may also hold a script. If there is a script the layout processor
executes the script to determine whether or not to perform the associated break action. The script must
return a Boolean value. If the script returns True the break action is taken. If the script returns False the
break action is not taken, that is the
breakBefore
or
breakAfter
has no effect. In the absence of a
script the break action is always taken..
Home Index Bookmark Pages
Pages: Home Index All Pages