XFA Specification
Chapter 19, Data Description Specification
Data Description Element Reference
750
<polyline>
<dd:group dd:minOccur="2" dd:maxOccur="-1">
<x/>
<y/>
</dd:group>
</polyline>
This matches the following sample data:
<polyline>
<x>1</x>
<y>1</y>
<x>1</x>
<y>6</y>
<x>20</x>
<y>15</y>
</polyline>
Note that the white space in the data description differs from the white space in the above sample data.
Nonetheless the sample data matches the data description. This is a consequence of the fact that white
space in data groups is not significant, as explained in
“White Space Handling” on page 133.
dd:maxOccur Attribute
This attribute sets the maximum number of times the element may occur in a contiguous sequence. The
default is 1, that is, by default no more than one occurrence is allowed. The special value-1 means that
there is no limit to the number of times the element may repeat. If the value is not -1 it must be a positive
integer.
The
dd:maxOccur
attribute corresponds in function to the XML Schema
xsd:maxOccurs
attribute.
Note however that the attribute name differs (no final “s” on
dd:maxOccur
) and that
xsd:maxOccurs
uses the value unbounded rather than-1.
Note that when an element has
dd:model
set to unordered, its direct children must not have
dd:maxOccur
set to anything larger than 1. This is the same restriction that applies in [XMLSchema] to
the children of the analogous element
xsd:all
.
For example, the following fragment declares that it is acceptable for the
po:item
element to repeat
without limit. Hence a single purchase order can list any number of purchased items.
<po:item dd:maxOccur="-1">
<po:desc/>
<po:qty/>
</po:item>
The following fragment declares that the number of “attendee” elements inside the “meeting” element is
limited to twelve (perhaps the capacity of the room):
<meeting>
<attendee dd:maxOccur="12">
</meeting>
dd:minOccur Attribute
This attribute sets the minimum number of times the element must occur in a contiguous sequence. The
default is 1, that is, by default at least one occurrence is required. The value0 means that the element is
optional. If the value is not 0 it must be a positive integer.