XFA Specification
Chapter 19, Data Description Specification
Data Description Element Reference
751
The
dd:minOccur
attribute corresponds in function to the XML Schema
xsd:minOccurs
attribute.
Note however that the attribute name differs (no final “s” on
dd:minOccur
).
Note that when an element has
dd:nullType
set to exclude it must also have
dd:minOccur
set to0.
The following fragment declares that “firstname” is not required in the purchase order. Without the
dd:minOccur
attribute the value of “firstname” could be the empty string but the element could not be
omitted entirely. On the other hand “lastname” continues to be mandatory.
<po:customer>
<po:lastname/>
<po:firstname dd:minOccur="0"/>
</po:customer>
Hence the following fragment of data is valid:
<po:customer>
<po:lastname>Smith</po:lastname>
</po:customer>
The following fragment declares that a meeting must be attended by at least two people:
<meeting>
<attendee dd:minOccur="2"/>
</meeting>
dd:model Attribute
This attribute controls the way in which the children of the element are related. The value of
dd:model
must be one of the following:
choice
The data must have a child element or elements corresponding to just one of the children of this
element. This corresponds to the
xsd:choice
element in [XMLSchema].
ordered
The data must have child elements corresponding to each of the children of this element (except
for children with
dd:minOccur
equal to 0, which are optional). The children must occur in the
same order that they are declared here. This corresponds to the
xsd:sequence
element in
[XMLSchema]. This is the default.
unordered
The data must have child elements corresponding to each of the children of this element (except
for children with
dd:minOccur
equal to 0, which are optional). The children may occur in any
order. This corresponds to the
xsd:all
element in XML Schema.
Note:
When an element has
dd:model
set to unordered, its direct children must not have
dd:maxOccur
set to anything larger than1. This is the same restriction imposed by [XMLSchema] upon the
children of the analogous element
xsd:all
.
The following fragment illustrates a simple use of
dd:model
with a value of choice:
<payment dd:model="choice">
<cash/>
<visa/>
<amex/>
</payment>
Home Index Bookmark Pages
Pages: Home Index All Pages