XFA Specification
Chapter 6, Template Features for Designing Forms with Repeating Sections
Prototypes
197
</subform>
<field name="ClientName" ID="ClientNameField" .../>
</proto>
It is possible for a template to improperly specify an endless loop of prototype references. For example, in
the following template fragment a prototype’s child invokes its own parent as a prototype.
Example 6.7
An endless prototyping loop
<proto>
<subform name="Client" ID="ClientSubform" ... >
<subform name="ClientName" use="#ClientSubform" ... />
</subform>
</proto>
It is the responsibility of the form creator to ensure that there are no endless prototyping loops.
Overriding Prototype Properties
An element that references a prototype is said to inherit all of the attributes, data content and child
elements of that prototype. When an element references a prototype, it has the option of overriding what
gets inherited. The general rule for inheritance is that a referencing object inherits the following:
All attributes of the prototype, except the following:
The id attribute
The name attribute
The use attribute
Any attributes specifically overridden in the referencing element
The data content of the prototype, unless specifically overridden
All child elements of the prototype, unless specifically overridden
Where the referencing element does not explicitly provide values for attributes, child elements, and data
content and no such values are inherited from the referenced prototype, application defaults shall apply.
The term
absolute omission
describes such an absence of content.
Overriding Attributes
Any attribute present in an element overrides that attribute from the prototype. For example, the
following template fragment defines two draw elements whose fonts both reference the 10pt Helvetica
prototype. However, the second one overrides the font size with a size of 14pt, and so, it will draw with a
font of 14pt Helvetica. In the first draw element's font, the font size was omitted, so it is inherited from the
prototype.
Example 6.8
Overriding an attribute
<proto>
<font id="HELV-RED"
typeface="Helvetica"
size="10pt"
weight="normal"
posture="normal">
<color value="255,0,0"/>
Home Index Bookmark Pages
Pages: Home Index All Pages