
ADOBE FRAMEMAKER 10
MIF Reference
152
Format rules
Format rules allow the template builder to specify the format of an element in specific circumstances. A format rule
can be either a context rule or a level rule.
A
context rule
contains clauses that specify an element’s formatting based on its parent and sibling elements. For
example, one clause of a format rule could specify that a Para element has the FirstBody paragraph format if it is the
first child of a Heading element. Another clause could specify that a Para element has the Body paragraph format in
all other contexts.
A
level rule
contains clauses that specify an element’s formatting on the basis of the level to which it is nested within
specific types of ancestor elements. For example, one clause of a level rule could specify that a Para element appears
in 12-point type if it has only one Section element among its ancestors. Another clause could specify that a Para
element appears in 10-point type if there are two Section elements among its ancestors.
Element definitions contain format rules grouped into the following statements:
•
EDTextFormatRules
•
EDObjectFormatRules
•
EDPrefixRules
<EDAttrRequired
boolean
>
Yes
means the attribute is required
<EDAttrReadOnly
boolean
>
Yes
means the attribute is read-only
<EDAttrHidden
boolean
>
Yes
means the attribute is hidden and will not appear in the Struc-
ture view or in the Edit Attributes dialog box
<EDAttrChoices
The choices, if the attribute type is
FAttrChoice
<EDAttrChoice
string
>
A choice
<EDAttrChoice
string
>
Additional statements as needed
…
>
End of
EDAttrChoices
statement.
<EDAttrDefValues
The default if the attribute is not required. If the attribute type is
FAttrInts
,
FAttrReals
,
FAttrStrings
, or
FAttrUniqueIdRefs
, the default can have multiple strings
<EDAttrDefValue
string
>
A default value
<EDAttrDefValue
string
>
Additional statements as needed
…
>
End of
EDAttrDefValues
statement
<EDAttrRange
Range of values the attribute is allowed to have
<EDRangeStart
string
>
The minimum value the attribute must have
<EDRangeEnd
string
>
The maximum value the attribute must have
>
End of
EDAttrRange
statement
>
End of
EDAttrDef
statement