[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

FM+SGML EDD Design



AN ANALYSIS OF ALTERNATIVE METHODS FOR FORMAT TING STRUCTURED DOCUMENTS WITH
FM+SGML EDDs
This paper discusses six methods commonly used for formatting structured
documents, followed by a recommended solution that combines the three best
methods.

A. THE “FULL INHERITANCE” METHOD
If the format rules for a Container-type element whose General Rule includes
<TEXT> do not specify a base paragraph format, FM+SGML uses the base
paragraph format specified in the nearest ancestor element. If a  base
paragraph format (e.g., Body) is  specified only at the highest level, all
descendants inherit that base paragraph format. 
Additionally, any format changes (to the base paragraph format) that are
specified in a container element’s ancestor chain are also inherited if they
are not overridden by format changes in the container element’s own format
rules.

1. Advantages and Disadvantages
a. Template Design: This approach eliminates the need for any paragraph
format design in the templates used to create documents. That is, the
template’s paragraph catalog contains a single paragraph format named Body.
The EDD Defines All Formatting Variations: All variations in paragraph
format Body for each container element are obtained from format rules in the
EDD. Consequently, template designers cannot override any of the formatting
specified in the EDD.

b. Flexibility: Since all formatting is specified in the EDD, variations in
formatting for different document types and delivery requirements are not
possible. The only way to achieve any required variations is to create
multiple EDDs, all of which have the same structure rules and element names,
but different format rules.

c. EDD Design: Under this approach, the entire burden of template design is
shifted to the EDD. The EDD designer, when developing the format rules for
each container element, must fully understand the all of the element’s
format inheritances. Since it’s not only possible, but also likely,  for an
element to have several different ancestor chains, the format inheritances
down each such chain may vary, producing unwanted variations in formatting
outcomes for the same element. Moreover, each time a new element is added,
or an existing element’s format rules are modified, the impact of those
changes/additions on that element’s descendants must be reanalyzed.

2. Conclusions
The “Full Inheritance” method is only feasible when:

a. The EDD is relatively simple, and nearly all container elements have a
single ancestor chain.

b. Formatting variations for different container elements are minimal.
c. The Application Definition File associates the EDD with a single document
type.

d. Formatting variations for different document delivery requirements are
not needed.

e. During the EDD’s lifetime, modifications will be extremely rare.

B. THE “PARTIAL INHERITANCE” METHOD
Ancestor format inheritance stops at each element whose format rules specify
a base paragraph format. That is, none of that element’s ancestor formatting
variations will be inherited, and all of that element’s descendents whose
General Rule specifies <TEXT> will inherit only the new base paragraph
format, and the formatting variations to that base format that are specified
within the ancestor chain that begins with the element where the new base
paragraph format was specified.

1. Advantages and Disadvantages
a. Template Design: Assuming that a relatively small number of base
paragraph formats are specified in the EDD, this approach simplifies
paragraph format design in the templates used to create documents.  All
variations in those paragraph formats for each container element are
obtained from format rules in the EDD. The set of base paragraph formats is
determined primarily by needed variations in format to accommodate different
document types and delivery requirements. In general, template design is
limited to those paragraph format parameters (e.g., font family, font size,
line spacing, advanced properties, table cell properties , widow/orphan
lines) which are not modified by format rules in the EDD.

b. Flexibility: This approach is less rigid than the “Full Inheritance”
method, because multiple templates can be created in which the formatting of
those base paragraph formats can be modified to meet different formatting
requirements for different document types and delivery requirements.

c. EDD Design: Design is less difficult than under the “Full Inheritance” ,
but problems may still exist. It is still necessary for the the EDD
designer, when developing the format rules for each container element, to
fully understand the element’s format inheritances. It’s still also likely
for an element to have multiple ancestor chains, in which case the format
inheritances down each such ancestor chain may vary, producing unwanted
formatting outcomes for the same element. And it’s still necessary, each
time a new element is added, or an existing element’s format rules are
modified, to reanalyze the impact of those changes/additions on that
element’s descendants. In general, the number of formatting variations
required in the EDD is fewer than under the “Full Inheritance” method,
because specifying a number of base paragraph formats shifts some of the
burden of format design from the EDD to the template.

2. Conclusions
The EDD  can be somewhat more complex than under the “Full Inheritance”
method, provided that nearly all container elements have a single ancestor
chain.

C. THE “NO INHERITANCE” METHOD
Under this approach, there is no format inheritance at all. This is
accomplished by specifying a base paragraph format in the format rules for
each container element that has <TEXT> in its General Rule. The selection of
base paragraph formats is determined primarily by the need for adapting the
templates to accommodate formatting variations  required to accommodate
different document type and delivery requirements.

1. Advantages and Disadvantages
a. Template Design: Same as the “Partial Inheritance” method.

b. Flexibility: Same as the “Partial Inheritance” method.

c. EDD Design: Since there is no inheritance, the EDD designer doesn’t have
to worry about it. The number of base paragraph formats need not be any
higher than in the “Partial Inheritance” method, because many different
container elements may use the same base format. Any required formatting
variations from the base format that are applicable in all contexts are
specified in an All Contexts rule. Additional formatting variations are
specified in Context rules.

2. Conclusions
This approach is almost always feasible, no matter how complex the EDD.
Within limits, it is adaptable to use in cases where different document
types and delivery requirements  dictate the creation of multiple templates
having different formatting of the same set of base paragraph formats.

D. THE “ALL PARAGRAPH FORMAT” METHOD
This is a variation on the “No Inheritance” method, in which a different
paragraph format is specified for each formatting variation. That is,
instead of format rules that modify individual parameters of a base
paragraph format, the format rules specify a different paragraph format for
each formatting variation, both in All Context rules and in Context rules.

1. Advantages and Disadvantages
a. Template Design: This approach shifts the entire format design burden
from the EDD to the template. However, in a complex EDD, the number of
different paragraph formats can become enormous.

b. Flexibility: This is the least rigid of all approaches. Templates for
different document types and delivery requirements have virtually complete
control over formatting.

c. EDD Design: The EDD designer’s main responsibility under this approach is
to manage the (typically) huge number of different paragraph formats that
are specified in the format rules. Each format variation must be assigned a
different paragraph tag name. In a complex EDD, managing such a large list
of names  can become even more onerous than managing format inheritances
under the “Full Inheritance” method.

2. Conclusions
This approach has no basic advantage, and many disadvantages. It is only
feasible if the number of paragraph formats can be kept to a reasonable
value, which typically means the EDD must be quite simple.

E. THE “FORMAT CHANGE LIST” METHOD
Although this method can be used with the “Full Inheritance” and “Partial
Inheritance” methods, it is most compatible with the “No Inheritance”
method. It is incompatible with the “All Paragraph” method. When this method
is utilized, virtually all format rules for modifying base paragraph formats
specify:
        “Use Format Change List: Name” 
Where “Name” is an unique name of a format change list. 

Format Change Lists should be viewed as modular formatting building blocks
that can be combined in many ways to produce different formatting outcomes
(e.g., the formatting for a particular element context can be specified in
the element’s Context rules to be the composite of two or more such building
blocks). Since the Format Change Lists themselves do not reside within the
format rules for the individual elements, format rules in many different
elements can utilize the same Format Change Lists, combined in different
ways to produce different formatting outcomes. 

1. Advantages and Disadvantages
a. Template Design: Same as the “Partial Inheritance” and “No Inheritance”
methods.

b. Flexibility: All of the format change lists can be grouped together into
categories at the end of an EDD. This makes it possible, for example, to
easily clone multiple versions of an EDD, all of which have identical
element names structure rules, and format rules,  plus the same named Format
Change Lists. However, the formatting details of those Format Change Lists
can vary between EDD versions so as to accommodate wide variations for
different document types and delivery requirements.

c. EDD Design: The use of Format Change Lists can greatly simplify the
element format rules in the EDD, since they simply reference Format Change
Lists. All of the formatting details can be contained in a grouped and
categorized set of Format Change Lists at the end of the EDD.

2. Conclusions:
This method, when combined with the “No Inheritance” method,  simplifies
template and EDD design, and provides a powerful method for adapting the EDD
to accommodate format variations for different document types and delivery
requirements. It is definitely the best of the five methods examined so far.

F. USING FORMATTING ATTRIBUTES IN CONTAINER ELEMENTS
Without the use of formatting attributes, a container element’s format is
determined solely by its context within the structural hierarchy. If other
types of formatting options are needed, a separately named element must be
created in the EDD for each such option. This  unnecessarily complicates the
EDD, as well as the authoring task.

Choice-type formatting attributes provide an excellent way to avoid such
element proliferation, and can provide authors with the options they need to
optimize the presentation of complex information.

Take, for instance, the ubiquitous Para element that serves as the
all-purpose text paragraph in many DTDs/EDDs. Here are some of the
formatting options an author might need for the Para element:
• Select the horizontal alignment of the paragraph as Left, Right, Center, or
  Justified.
• Select the vertical alignment as Top, Middle, or Bottom within a table cell.
• Create a multi-paragraph structure having multiple levels of indenture, with
  all lines of each paragraph lined up at its specified level of indenture.
• Change the font size from Regular (the size in the base paragraph format) to 2
  pts more (Large) or less (Small) than Regular, with a corresponding change
  in line spacing.
• Change the font to Courier to represent a computer message or a typed
  command.
• Make the entire paragraph bold, italics, or underlined.
• Make the paragraph span all columns, both the sidehead and normal
  columns, or just a single column.
• Make the paragraph appear at the top of a column (Column Break) or at the
  top of a page (Page Break).
All of these options can be easily provided by choice-type attributes, in
which the default value for each attribute produces the format specified by
the base paragraph format.

RECOMMENDED SOLUTION
I believe the “No Inheritance” method, combined with extensive use of Format
Change Lists and choice-type formatting attributes provides the best design
solution for EDD development.
     ____________________
     | Nullius in Verba |
     ********************
Dan Emory, Dan Emory & Associates
FrameMaker/FrameMaker+SGML Document Design & Database Publishing
Voice/Fax: 949-722-8971 E-Mail: danemory@primenet.com
10044 Adams Ave. #208, Huntington Beach, CA 92646


** To unsubscribe, send a message to majordomo@omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **