XFA Specification
Chapter 6, Template Features for Designing Forms with Repeating Sections
Prototypes
198
</font>
</proto>
<draw ...>
<font use="#HELV-RED"/>
<value>
<text>Helvetica 10pt</text>
</value>
</draw>
<draw ...>
<font use="#HELV-RED" size="14pt"/>
<value>
<text>Helvetica 14pt</text>
</value>
</draw>
As implied in the previous paragraph, an attribute is considered to be omitted only if it was not explicitly
specified with a value on an element. An attribute that is explicitly specified on an element with the value
of an empty string is not considered to be omitted; as should be obvious, the attribute is specified as
having the value of an empty string, which signifies the default.
Overriding Data Content
The presence of data content in a referencing element overrides data content from the prototype. For
example, in the following template fragment the text value of the field will be “
Overriding text
”.
Example 6.9
Overriding content
<proto>
<text id="TEXT"/>default TEXT</text>
</proto>
<field ...>
<value>
<text use="#TEXT">Overriding text</text>
</value>
</field>
Note:
It is not possible to override prototype data content with empty data content.
Overriding Child Elements
When both the referencing element and the prototype contain child elements, those child elements are
matched first by type and then by ordinal number within type. If the prototype has a child element of a
particular type and the referencing element does not, the referencing element inherits the child from the
prototype. When the child is present in both, the prototype's child acts as a prototype for the referencing
element's child. In other words, the referencing element's child will inherit attributes and grandchild
elements from the prototype's child, as long as it doesn't override them. The following example has a field
that inherits from a prototype field element.
Example 6.10 Overriding child elements
<proto>
<field id="DEFAULT-FIELD">
<font typeface="Helvetica" size="10pt" weight="bold">
<color value="255,0,0"/>
</font>