Structure_Dev_Guide
Structure_Dev_Guide
Attributes . . . . . . . . . . . . . . 93 Cross-references . . . . . . . . . . . . 97
4
Supported characters in element and attribute Unicode and character encodings . . . . . . 103
names . . . . . . . . . . . . . . 101 Supported encodings . . . . . . . . . 103
Multiple attribute lists for an element . . . . 101 FrameMaker display encodings . . . . . . 104
Namespace declaration . . . . . . . . . 102 Encoding for XML files . . . . . . . . . 105
Rubi text . . . . . . . . . . . . . . 103
Writing an EDD general rule . . . . . . . . 175 How content rules translate to markup data . . 182
Syntax of a general rule for EDD elements . . 176 Inserting descendants automatically in containers 183
Restrictions on general rules for tables . . . 178 Inserting table parts automatically in tables . . 184
Default general rules for EDD elements . . . 179 Initial structure pattern . . . . . . . . 185
Specifying validity at the highest level in a flow . 180 Default initial structure . . . . . . . . 186
Adding inclusions and exclusions . . . . . . 180
6
Inserting Rubi elements automatically in Rubi groups Initial structure pattern . . . . . . . . 188
187
Debugging structure rules . . . . . . . . 188
Chapter 14 Text Format Rules for Containers, Tables, and Footnotes . . . . . 205
In this chapter . . . . . . . . . . . . . 205 Writing first and last format rules . . . . . . 227
Overview of text format rules . . . . . . . 206 How first and last rules are applied. . . . . 228
A first or last rule with an autonumber . . . 229
How elements inherit formatting information . . 207
The general case . . . . . . . . . . . 207 Defining prefixes and suffixes . . . . . . . 229
Inheritance in a table or footnote . . . . . 210 How prefix and suffix format rules are applied . 230
Inheritance in a document within a book. . . 211 A prefix or suffix for a text range . . . . . 230
A prefix or suffix for a paragraph . . . . . 231
Specifying an element paragraph format. . . . 212
A prefix or suffix for a sequence of paragraphs . 231
Writing context-dependent format rules . . . . 212
A prefix or suffix for a text range or a paragraph 232
Defining the formatting changes in a rule . . . 213 Attributes in a prefix or suffix rule . . . . . 233
Paragraph formatting . . . . . . . . . 213
When to use an autonumber, prefix or suffix, or
Text range formatting . . . . . . . . . 214 first or last rule . . . . . . . . . . . . 234
No additional formatting . . . . . . . . 215
Defining a format change list . . . . . . . 235
Specifications for individual format properties . . 216
Setting minimum and maximum limits on properties
Basic properties . . . . . . . . . . . 218 236
Font properties . . . . . . . . . . . 220
Debugging text format rules. . . . . . . . 238
Pagination properties . . . . . . . . . 222
Numbering properties . . . . . . . . . 223
Advanced properties . . . . . . . . . 224
Table Cell properties . . . . . . . . . 225
Asian Text Spacing properties . . . . . . 225
Direction properties . . . . . . . . . . 226
FrameMaker layout engine (Asian Composer) . 227
8
Case conventions . . . . . . . . . . . 278 Comments. . . . . . . . . . . . . . 279
Strings and constants . . . . . . . . . . 278 Include files . . . . . . . . . . . . . 280
String syntax . . . . . . . . . . . . 278 Reserved element names . . . . . . . . . 280
Constant syntax . . . . . . . . . . . 279
Commands for working with a rules document . 281
Variables in strings . . . . . . . . . . 279
10
Specifying the entity name on export . . . . 390 Changing how FrameMaker writes out the size of a
graphic . . . . . . . . . . . . . . 392
12
Structured templates . . . . . . . . . 439
Moving data between markup and FrameMaker440
Customizing markup import/export . . . . 441
Structure application files . . . . . . . . 443
Legacy documents . . . . . . . . . . 446
Application delivery . . . . . . . . . . 446
Typical application development scenarios . . . 447
Starting from existing markup documents . . 447
Building a new application . . . . . . . 450
Working with legacy documents . . . . . 450
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
This developer’s guide and its associated reference manual are for anybody who develops
structured FrameMaker® templates and XML or SGML applications. They are not written for end
users who author structured documents that use such templates and applications.
Prerequisites
The following topics, which are outside the scope of this manual, are important for you to
understand before you try to create a structured template or structure application:
•Structured document authoring in FrameMaker
•XML or SGML concepts and syntax, including how to work with a document type definition
•FrameMaker end-user concepts and command syntax
•FrameMaker template design
In creating some XML or SGML applications, you may also need to understand the following:
•XSLT 1.0
•C programming
•FDK API usage
If your application requires only the special rules described in this manual to modify the default
behavior of FrameMaker, you do not need programming skills. However, if you need to create an
XML and SGML API client to modify this behavior further, you need to program the client in C,
using the FDK. This manual does not discuss the creation of XML and SGML API clients. For this
information, see the Structure Import/Export API Programmer’s Guide.
Monospaced font Literal values and code, such as XML, SGML, read/write
rules, filenames, and path names.
Blue underlined text A hyperlink you can click to go to a related section in this
book or to a URL in your web browser.
Part I provides beginners information for developing structure applications. The chapters in this
part are:
•Chapter 2, “Screen modes” provides an overview of the Quick Start chapters for typical
application development scenarios.
•Chapter 3, “Screen modes” describes how to create a simple EDD and a structured template. This
is the easiest way to start with structured documentation.
•Chapter 4, “Screen modes” explains the conversion of your first structured template into a real
XML application.
Developing a FrameMaker structure application can appear complex at first. True, there is
ultimately a lot to learn, but the overall process is easily broken down into manageable topics.
This Quick Start section presents the first two stages in FrameMaker structure application
development. Choose the development process that matches your requirements then follow the
simple instructions in the following chapters.
When you have completed the Quick Start chapters, move on to the main parts of the Developer
Guide.
Important: The step-by-step instructions in the following QuickStart chapters assume that
FrameMaker is set up to automatically insert child elements.
This Quick Start chapter guides you through the first stages of structured application
development. After following these instructions you will understand the FrameMaker structure
model and how to build a structured FrameMaker template.
The intention here is to introduce the basic of the features of a structured template, rather than
to build the perfect structure application. After working through this chapter you should be able
to adapt the results to fit your own requirements.
Prerequisites
The following topics, which are outside the scope of this manual, are important for you to
understand before you begin to work through this chapter:
•Structured document authoring in FrameMaker
•FrameMaker end-user concepts and command syntax
•FrameMaker template design
Element catalog
The most obvious difference between unstructured and structured templates is the Element
Catalog. The Element Catalog stores the structure definitions and context based formatting rules
that you will design and create.
The structured template’s end-users use the element catalog dialog to select valid elements to
insert within the structure they have created.
As the developer of the structured template you will use the Element Definition Document or EDD
to create the structure definitions and formatting rules. This EDD is then imported into your
template creating, or updating the element catalog. The creation of a simple EDD is explained in
“Screen modes” on page 27.
Master Pages
Master pages in a structured template are identical to their unstructured equivalent. In a normal
structured FrameMaker document only the main flow—typically flow A—makes use of the
element catalog. All other text frames should be formatted using unstructured paragraph formats
and character formats.
Note: It is recommended that the formatting on a master page is always applied with
paragraph and character formats without any overrides. This becomes important if the
template is eventually used in a markup application. Format overrides are often lost on
import from markup.
Paragraph Catalog
As mentioned in the previous section, paragraph formats are still very important in the design of
a structured template. Paragraph formats are also one of the ways that you can apply formatting
in an EDD.
Format Catalog
Character formats are the only way to apply formatting to autonumber text in a structured
template.
Tables
FrameMaker table formats are only partially integrated with the structure model. The content of
a FrameMaker table is always fully structured, but the control over cell border ruling is limited and
there is no structure format control over cell shading.
Note: An EDD is itself just another structured document, although more complex than the
EDD you are about to create. You should already be familiar with structured editing
techniques.
Create an EDD
You will now build an EDD for a simple document. Follow these steps to build the structure
definitions, the formatting will be added later:
Element:
2.Save the new EDD with a relevant file name.
3.Add the Tag of the top level element which will be Document:
EDD Version is <version>
Automatically create formats on import.
Element: Document
4.After the Tag element insert the Container element which will also add its child element
GeneralRule.
Important: Making an element valid at the highest level means that it will be listed in the
Element Catalog dialog for an empty structured document. This provides a starting point
for the author of a structured document.
7.Add an element definition for each element that you defined in the GeneralRule. Start by
adding an Element element.
8.Add the element’s name to the Tag element.
9.Insert the Container element.
10.For the GeneralRule of your Title element definition type <TEXT> including the angle
brackets.
Important: <TEXT> means that the end user can type text directly into this element.
11.For the GeneralRule of your Section element definition type
Title, (Paragraph | Table | Graphic)*, Section*
This General Rule states that each Section must start with a Title, which is followed by zero or
more Paragraph, Table or Graphic elements in any order. It ends with zero or more
Section elements.
Attribute list
1. Name:
6.Add a suitable Name for the attribute, such as “ID”.
7.Add a UniqueID after Name, then add the Optional element. The attribute list should now
look like this:
Attribute list
1. Name:ID UniqueID Optional
Note: When an end user creates a cross reference FrameMaker automatically generates a
unique value for the source element’s UniqueID attribute.
If you prefer that all ID values are provided, define the attribute as Required. The end
user will then be prompted for an ID value when the new element is created. FrameMaker
will ensure that the ID values provided are unique by rejecting any duplicates.
8.Repeat steps 2 to 4 of this Screen modes section for each of the other element definitions that
are to have an ID attribute (the Document, Section, Paragraph and Table element
definitions).
Note: Instead of building the structure element by element, simply copy and paste the ID
attribute definition into the correct position in each element definition.
9.The initial structure is now complete, so you can test it by importing the EDD into your first
template.
10.If you already have a template, open it. Otherwise open a new empty FrameMaker document.
2.Click Import which will add the element catalog to the template document.
3.If your structure is valid you will see the information message:
4.If there is a problem with the EDD you will see an error message. The error message will either
indicate that the EDD is structurally invalid, or that there are errors in the General Rules.
A structurally invalid EDD displays a warning message dialog. Go back to the EDD and fix any
errors: select Element > Validate... fix the problems then try again.
Other EDD errors are presented as an Element Catalog manager report which will list each
problem.
Element Catalog Manager Report
August 1, 2009
Imported EDD: C:\QuickStart\document.edd.fm
Destination Document: C:\QuickStart\document.tpl.fm
The structure view for this test document is presented on the next page. You may notice that
the Table element already has a structural error. Also notice that the positions of the anchored
frame and the table are reversed when compared to the document view above. These
problems will be investigated and fixed in the following sections.
Basic Formatting
It’s normal to start formatting at the top level element then move down the tree adding
formatting rules where necessary until you have achieved the desired results.
1.In the EDD that you created earlier find the top level element document.
2.Add the TextFormatRules element as the last child of Container.
3.You now have the choice of four elements; AllContextsRule, ContextRule,
ElementPgfFormatTag and LevelRule. Add the AllContextsRule, the other
elements will be investigated later.
4.You will be formatting the Document element with properties that are equivalent to those
found in the Paragraph Designer, so you must now add the ParagraphFormatting
element.
7.Add the Size element, then type “10pt”as its <TEXT> content. The element definition for
Document should now look like this:
Element(Container):Document
Valid as the highest-level element.
General Rule:Title, Section+
Attribute list
1. Name:ID UniqueID Optional
10.Notice that the Table has not picked up the formatting that was defined for Document. This
is normal behavior for FrameMaker tables. Copy the formatting rules from Document and
paste them as the last child of Table.
11.Save the EDD then switch to your test document.
12.Import the EDD. If there are no errors the table formatting will now match the rest of the
document:
You will notice that some formatting—Family and Weight—is used for all contexts. While
Size and Autonumber depend on the element’s context. You start by adding the common
formatting.
1.Locate the element definition for Title.
2.Create an AllContexts rule as explained previously.
3.Add the Weight element and then its Bold child element.
Note: There is no need to add a formatting rule for the font Family element as that has
already been provided on the Document element.
Important: The order of context specifications must always be to start with the most
specific rule and end with the most general rule. If you do not follow this order for context
rules, the most general rule will be applied for all contexts.
8.Add the context specification “Section < Section”.
For this context add these formatting rules:
Property Value
PropertiesFont < Size 12pt
PropertiesNumbering < AutonumberFormat <n>.<n+>\t
Property Value
PropertiesFont < Size 14pt
PropertiesNumbering < AutonumberFormat <n+>\t
The text format rules for Title should now look like this:
Text format rules
1. In all contexts.
Default font properties
Weight: Bold
2. If context is: Document
Default font properties
Size: 18pt
Else, if context is: Section < Section
Default font properties
Size: 12pt
Numbering properties
Autonumber format: <n>.<n+>\t
Else, if context is: Section
Default font properties
Size: 14pt
Numbering properties
Autonumber format: <n+>\t
Note: The EDD provides the Level rule as an alternative way to define contexts for
nested sections. See Chapter 17, “Context Specification Rules,” for detailed instructions.
11.Save the EDD then switch to your test document.
12.Import the EDD. If there are no errors the document will now look like this:
Note: A nested section has now been added to show the formatting for that context.
Property Value
PropertiesBasic < Indents < FirstIndent 0.3”
PropertiesBasic < Indents < LeftIndent 0.3”
PropertiesBasic < TabStops < TabStop < 0.3”
TabStopPosition
2.The Title element will now pick up the indent that has been applied to Section which is
not the desired result, so the first indent must be corrected. Add this All Contexts Rule to the
Title element definition.
Property Value
PropertiesBasic < Indents < FirstIndentRelative -0.3”
Note: The EDD provides more control over some formatting properties than the
unstructured Paragraph format. In the example above a relative value has been provided
for the First indent property. The value is relative to the formatting that is inherited from
the element’s parent or an ancestor element.
3.You will now add some space above each Title. You could simply add the necessary
formatting rules to the Title element definition. That would be adequate for the
requirements of the current document, but there is a useful alternative, the
FirstParagraphRules.
Locate the element definition for Section.
4.Add a FirstParagraphRules element as the last child of Container.
5.FirstParagraphRules accepts the same child elements as TextFormatRules, so use the
same techniques to add the formatting:
Property Value
PropertiesBasic < ParagraphSpacing < SpaceAbove 10pt
Important: The first paragraph rule applies formatting to the first child element, whatever
that element may be. This can significantly reduce the amount of formatting rules required
if an element has many element that could be the first child.
LastParagraphRules provides similar formatting control for the last child element.
6.Save the EDD then switch to your test document.
7.Import the EDD. If there are no errors the document will now look like this:
4.After the TextRange element you can add the character formatting rules in one of three ways:
–CharacterFormatTag
–FormatChangeListTag
–PropertiesFont
Note: The CharacterFormatTag lets you apply a character format tag to the element.
The character format will need to be defined in the structured template or document. If
the character format is not available in the document when you import the EDD
FrameMaker will create a format with that name, however it will not yet carry any specific
formatting information. You will need to edit the character format using the Character
designer.
A FormatChangeListTag is a reference to collection of formatting properties in the
EDD. Its use is very similar to a character format tag. A format change list can include all
formatting properties, but if it is referenced from TextRangeFormatting only the font
properties take effect.
PropertiesFont lets you specify the font properties for the text range directly. You will
use this method in the following step.
5.Insert the PropertiesFont element after TextRange.
6.Add the Weight then the Bold elements. The element definition should look like this:
Element(Container):Emphasis
General Rule:<TEXT>
Formatting cross-references
So far you have been formatting FrameMaker container elements. A cross-reference is a
FrameMaker element object and as such there are limitations to what can be done with the EDD.
You can specify the Initial cross-reference format, but no other properties. In this section you will
set up two new cross-reference formats that can be selected by attribute value when an Xref
element is inserted in the test document.
1.In the EDD add a new attribute definition to the element definition for Xref.
2.Add a Name for the attribute “Format”.
3.Add a Choice after Name, then add the Required element. Finally add the Choices element
then type “Para | Section“. The attribute list should now look like this:
Attribute list
1. Name:IDref ID Reference Required
2. Name: Format Choice Required
Choices: Para | Section
4.The initial cross-reference format will be based on the value of the Format attribute. Add the
following ContextRule.
Note: These context specifications use the value of an attribute on the current element.
You can also combine element and attribute context specifications. For more information
see, Chapter 17, “Context Specification Rules,”
The Initial cross-reference format will now look like this:
Initial cross-reference format
1. If context is: [Format=”Para”]
Use cross-reference format: Para
If context is: [Format=”Section”]
Use cross-reference format: Section
5.Save the EDD then switch to your test document.
6.Import the EDD. The first time you import it you will see an Element Catalog Manager Report:
Element Catalog Manager Report
August 1, 2009
Imported EDD: C:\QuickStart\document.edd.fm
Destination Document: C:\QuickStart\document.tpl.fm
Messages...
Creating new cross-reference format (Para).
Creating new cross-reference format (Section).
Element Catalog Manager completed.
The new cross-references formats need to be completed. You can use element or attribute
based building blocks to create a suitable format.
Anchored objects
Anchored objects such as Tables, Graphics and Equations may not always appear in the expected
location. An example of this behavior can be seen in the test document where the position of the
Table and the Graphic are reversed.
One way to ensure that anchored objects are positioned correctly is to use an anchor element.
This is simply a container element that can contain the anchored object. By formatting the anchor
with minimum line height and font size it has no effect on the design or pagination of the
document.
1.Create a new element definition for the Anchor element. It should look like this:
Element(Container):Anchor
General Rule:(Table | Graphic)
Note: The Type attribute has been defined as optional so that the user does not need to
choose a value. When no value is chosen an imported graphic will be inserted. An
alternative method would be to define a default value for the Type attribute. The Else
statement would then be unnecessary.
FirstParagraphRules. This method works very well for small to medium size EDDs, however
it does not re-use any formatting definitions.
The Format Change List is a named group of formatting property elements. You can reference a
Format change list as many times as you like from any context for TextFormatRules,
FirstParagraphRules, LastParagraphRules and TextRangeFormatting. For more
information see “Screen modes” on page 235.
As an alternative to specifying the formatting within the EDD, you can reference paragraph format
tags for any context. This method can be used to good effect when converting an existing
unstructured template. The document will look exactly the same as its unstructured predecessor
and there will be no need to re-work cross-reference formats, generated lists or any of the other
paragraph tag related items.
In practice it is normal to combine all three methods of formatting.
Next steps
This structured template development exercise shows some of the power and flexibility that
FrameMaker delivers. There are of many more FrameMaker features that have not been
mentioned here. Take the time to read the more detailed chapters in this Developer Guide then
add features to the template that enhance its functionality.
In this Quick Start chapter you will convert your first structured template into a fully functional
XML application capable of saving and opening XML with full round-trip ability.
The term XML round trip means that when a structured FrameMaker document is saved to XML an
identical FrameMaker document is created when that XML instance is opened.
#include "isoall.rw"
2.The #include directive for “isoall.rw” is not required for XML, so it may be removed.
3.Add a mapping rule for the Xref element. This rule identifies the element as a FrameMaker
cross-reference then maps the cross reference format property to the formatprop attribute.
element "xref" {
is fm cross reference element "Xref";
attribute "formatprop" is fm property cross-reference format;
}
4.The mapping for a table is more complex because each table part needs a separate rule. The rule
for table will ensure that cell border ruling override properties, number of columns and the
width of each column are written to XML.
element "table" {
is fm table element "Table";
attribute "frame"
{
is fm property table border ruling;
value "top" is fm property value top;
value "bottom" is fm property value bottom;
value "topbot" is fm property value top and bottom;
value "all" is fm property value all;
value "sides" is fm property value sides;
value "none" is fm property value none;
}
attribute "colsep" is fm property column ruling;
attribute "rowsep" is fm property row ruling;
attribute "numcols" is fm property columns;
attribute "colwidths" is fm property column widths;
}
element "tablehead" {
is fm table heading element "TableHead";
}
element "tablebody" {
is fm table body element "TableBody";
}
element "row" {
is fm table row element "Row";
}
element "cell" {
is fm table cell element "Cell";
}
5.The rule for the Graphic element identifies the FrameMaker element type and provides
instructions for the export of the contents of an anchored frame. In this case graphics will be
saved with a file name based on the document’s file name. The default behavior is retained
for imported graphic files.
element "graphic" {
is fm graphic element "Graphic";
writer anchored frame {
notation is "CGM";
export to file "$(docname).cgm";
}}
6.Save the new read/write rules file into the same folder as the other application components.
Note: In each of the read/write rules above, the element names have been slightly
changed so that the XML saves as all lowercase while Capitalized names are used in
FrameMaker.
Create a DTD
An XML application needs a DTD or schema for validation. In this section you will create a DTD
from the EDD. FrameMaker cannot save an EDD as an XML schema.
1.Open the EDD that you created in the previous chapters.
2.Add the StructuredApplication element then type in the name of the XML application
that you created in the previous section.
3.Select StructureTools > Save as DTD...
4.Enter a file name in the Save As DTD dialog. It is recommended that you use the .dtd
extension.
5.If your EDD is valid you shouldn’t see an error log. However, it is possible to build SGML style
General rules in FrameMaker that are not permitted in XML.
6.A message dialog will tell you that FrameMaker has finished writing the DTD.
The DTD is now ready to be used.
Note: This error was deliberately created by deleting a required Title element.
Save as XML Log
August 1, 2009
Source Document: C:\QuickStart\QuickStart1.fm
Destination Document: C:\QuickStart\QuickStart1.xml
How to interpret the XML Log message The file name referenced in the parser message
QuickStart1.xml.26F is a temporary file that FrameMaker creates while writing the real XML
file. By the time you read the error message the temporary file will have been deleted. However,
the line number and character numbers are normally accurate if you need to check the XML
output.
Paragraph is not valid for content model means that the first element encountered was
Paragraph although the content model requires Title to be the first element.
Save as XML
Your XML application is now ready to open and save XML. Yes it’s that easy to get started with
XML!
1.Create a new document based on the structured template. Select File > New > Document...
2.In the New dialog select Document.tpl.fm, click New.
3.An empty structured document is created. Using normal FrameMaker editing techniques add
text, tables, and graphics.
4.Validate then Save the document. A this stage the document is still in FrameMaker format.
5.To save the document as XML, simply select File > Save As XML... Provide a suitable name for
the XML file, click Save. You will receive no feedback for a successful save.
Note: This error was deliberately created by deleting a required Title element.
Save as XML Log
August 1, 2009
Source Document: C:\QuickStart\QuickStart1.fm
Destination Document: C:\QuickStart\QuickStart1.xml
How to interpret the XML Log message The file name referenced in the parser message
QuickStart1.xml.26F is a temporary file that FrameMaker creates while writing the real XML
file. By the time you read the error message the temporary file will have been deleted. However,
the line number and character numbers are normally accurate if you need to check the XML
output.
Paragraph is not valid for content model means that the first element encountered was
Paragraph although the content model requires Title to be the first element.
Next steps
This XML application development exercise shows that round trip XML is easy to develop. There
are of course many more FrameMaker features that have not been mentioned here. Take the time
to read the more detailed chapters in this Developer Guide then add features to the application
to suit your specific needs.
Many FrameMaker features are already enabled in the XML application. Try an XML round trip with
Track Text Edits or Filter by Attribute enabled.
Part I provides basic information for developing structure applications. The chapters in this part
are:
•Chapter 5, “Screen modes” provides an overview of how you go about developing a FrameMaker
structure application. Discusses the features of markup applications, and typical application
development scenarios.
•Chapter 6, “Screen modes” describes situations that require a structure application, and the
basics of how to create a structure application.
•Chapter 7, “Screen modes” compares relevant markup language and FrameMaker concepts. You
should read this chapter even if you are already familiar with both the markup language (SGML
or XML) and FrameMaker, since translation between the two is its own distinct topic. The
chapter deals with counterpart constructs in the two representations, and also with constructs
in one that have no real counterpart in the other.
–Chapter 8, “Screen modes” compares XML and FrameMaker concepts.
–Chapter 9, “Screen modes” compares SGML and FrameMaker concepts.
•Chapter 10, “Screen modes” describes typical application creation workflow. Also discusses the
types of files used in your final SGML application.
•Chapter 11, “Screen modes” tells where to find special files used by FrameMaker with XML and
SGML documents. Also explains creation of the file that defines the pieces of your structure
application.
FrameMaker provides a robust and flexible set of tools for creating markup editing and publishing
applications. All general-purpose markup systems require application-specific information. You
can use FrameMaker to develop such an application in a set of steps, each of which is
straightforward.
The major parts of an application correspond to components in which the information is specified,
as follows:
The structure application bundles this information so that it can be easily accessed. Application
development involves creating these files along with data analysis, documentation, and
maintenance activities.
This chapter provides an overview of the development process. It contains these sections.
•“Screen modes,” next, examines the features and components of markup applications.
•“Screen modes” on page 63 summarizes the process of developing a structure application,
covering the steps common to many editing and publishing tools, and those unique to
FrameMaker.
•“Screen modes” on page 68 enumerates the tasks involved in developing a FrameMaker
application and defines the files containing modules of the application that the application
developer maintains.
Markup applications
A markup application is an application that manages and stores critical business information in a
markup format. Here, markup refers to either XML (Extensible Markup Language) or SGML
(Standardized General Markup Language).
There are two important aspects of markup that make it suitable for streamlining the creation,
maintenance, and delivery of critical business information:
•Open standards
•Formal structure
If you can take advantage of these aspects, you will see improvements in your publishing process,
and increased accuracy in the information you deliver. Because of open standards, you can share
your information with more people using a wider variety of software applications. If you take
advantage of the formal structure in markup, you can develop increasingly sophisticated ways to
automate your processes.
Part of the formality of markup is that it separates content from appearance. The way markup
separates a document’s content from its appearance and intended processing makes it a natural
format for single-source documents. However, the ability to use text in different ways requires that
each use be defined. In markup terminology, such a definition is called an application.
More precisely, the SGML standard (ISO 8879, Standard Generalized Markup Language) defines a
text processing application to be “a related set of processes performed on documents of related
types.” In particular, the standard states that an SGML application consists of “rules that apply
SGML to a text processing application including a formal specification of the markup constructs
used in the application. It can also include a definition of processing.” This definition applies
equally XML
Whether you are interested in XML or SGML, a publishing system that uses this technology is a
general markup application. A markup application is the sum total of the tools in your XML or
SGML publishing system. You work with these tools to author, process, and deliver your
information in a variety of formats that can include print, PDF, HTML, or business transactions.
Database Markup
Depends on a schema to define record Uses a type definition (DTD or XML Schema) to
layout define structural elements and attributes
Input forms facilitate data entry Configured XML or SGML text editor facilitates
data entry
Reports present customized summaries and Composed documents present information to
other views of information end user
The DTD and accompanying input and processing conventions comprise the rules that define a
markup application.
While markup applications need not include a visual rendering of documents—consider a voice
synthesizer, word count, or linguistic analysis tool—many of them do involve publishing.
Publishing is the process of distributing information to the consumer. Traditional publishing
involves preparation of written materials such as books, magazines, and brochures. Computerized
information processing facilitates the publishing of information in additional media, such as the
Internet, mobile applications or CD-ROM, and also provides the possibility of interfacing with
other applications, such as database distribution.
<taskmodule skill="adv">
<heading>Tuning a 5450A Widget</heading>
<warning type="1">Do not hit a widget with a hammer. Doing so
could cause explosive decompression.</warning>
<background>The 5450A Widget needs tuning on a <emph>monthly
basis</emph> to maintain optimum performance. The procedure
should take less than 15 minutes.</background>
<procedure>
<step time="1">Remove the tuning knob cover.</step>
<step time="5">Use the calibration tool to adjust the setting to
initial specifications.</step>
</procedure>
</taskmodule>
The markup can be passed through a rendering application to present the mechanics with a
formatted version:
The application that prepares the formatted version applies rules indicating how the elements of
the markup example are to appear. This example applies these rules:
•Put the heading element in a large, bold font.
•Generate the sentence, “This procedure requires advanced certification” from the value of the
skill attribute.
•Insert the italic header “Warning:” before the text of the warning element.
•Number the steps in the procedure.
Notice that the values of the time attributes do not appear in the formatted text. The rules that
drive a different application—a scheduling program, for instance—might use the time attribute
to allocate the mechanic’s time, for example. Or it might assemble the entire maintenance
procedure (possibly thousands of such maintenance cards), and add up the times for each step to
estimate the maintenance schedule.
Some tools address either the editing or the publishing application. FrameMaker is a single tool
that addresses both. Although you can use FrameMaker for either activity alone, its strengths
include the ability to create new structured documents (or edit existing ones) that are ready for
publishing without additional processing. This pairing allows a single set of format rules to
support both tasks. Thus, less effort is required to configure FrameMaker than to configure
separate editing and publishing tools.
•Providing page-layout information such as running footers and headers, margins, and so on—
the foundation of every WYSIWYG document.
•Establishing a correspondence between the markup and FrameMaker representations of a
document. For most elements, this correspondence is straightforward and automatic, but
FrameMaker allows for some variations. For example, terse markup names can be mapped into
longer, more descriptive FrameMaker names, and variant representations of tables, graphics,
and other entities can be chosen.
Each of these tasks requires planning and design before implementation, as well as testing
afterward.
Defining structure
A primary goal of the analysis phase is defining the structures that the end user will manipulate
within FrameMaker. The bulk of this effort is often the creation of a DTD. When the project begins
with an existing DTD, the DTD provides a foundation for the structure definition. FrameMaker, in
fact, can use the DTD directly. Nevertheless, a pre-existing DTD does not eliminate the need for
analysis and definition. As Eve Maler and Jeanne El Andaloussi explain in Developing SGML DTDs:
From Text to Model to Markup, many projects use several related DTDs. If the existing DTD is
intended for interchange, the editing environment can often be made more productive by
creating an editing DTD. Several examples from the widely known DocBook DTD used for
computer software and hardware documentation illustrate the types of changes that might be
made:
•Changing some element names, attribute names, or attribute values to reflect established
terminology within the organization.
For example, DocBook uses the generic identifier CiteTitle for cited titles. If authors are
accustomed to tagging such titles as Book, an application might continue to use the element
name Book during editing, but automatically convert Book to and from CiteTitle when
reading or writing the markup form of the document.
•Omitting unnecessary elements and attributes.
DocBook defines about 300 elements. Many organizations use only a small fraction of these.
There is no need to make the remainder available in an interactive application. FrameMaker
displays a catalog of the elements that are valid at a given point in a document. Removing
unnecessary elements from the authoring DTD means the catalog displays only the valid
elements that an organization might actually use in a particular context and avoids
overwhelming the user with a much larger set of valid DocBook elements.
•Providing alternative structures.
For example, DocBook provides separate element types—Sect1, Sect2, and so on—for
different levels of sections and subsections. Defining a single Section element to be used at
all levels (with software determining the context and applying an appropriate heading style)
simplifies the task of rearranging material and hence provides a better environment for authors
who may need to reorganize a document. Again, Sections can be automatically translated
to and from the appropriate Sect1, Sect2, or other DocBook section element.
•Simplifying complex structures that are not needed by an organization.
DocBook, for instance, provides a very rich structure for reporting error messages. If only a few
of the many possibilities will actually be used, you can edit the DTD to eliminate unnecessary
ones.
In addition to providing and editing the DTD, the analysis and definition of structure includes
planning for the use of tables and graphics. Many DTDs provide elements that are clearly intended
for such inherently visual objects. In other cases, however, such a representation of an element
results from the formatting rules of the application. Consider again, for instance, the repair
procedure on page 62. The formatted version did not display timing information for the procedure
steps. This alternative version formats the procedure in a three-column table, showing the
duration of each step:
S te p Duration Description
1 1 minute Remove the tuning knob cover.
2 5 minutes Use the calibration tool to adjust the setting to initial
specifications.
Thus, defining structure involves defining the family of DTDs to be used in the project as well as
deciding in general terms how the various elements will be used.
Testing
Although writing a DTD or a formatting specification does not use a traditional programming
language, it is essentially a programming process. Therefore, even when there is no need for FDK
clients, creating an markup application (for FrameMaker or any other tool) is a software
development effort and, as such, requires testing. Two types of tests are needed: realistic tests of
actual documents and tests of artificial documents constructed specifically to check as much of
the application as possible.
All necessary processes must be tested: formatting, markup import, and markup export. Test
documents must include FrameMaker documents to save as markup, and markup documents to
open in FrameMaker. Testing must also include any processing of legacy documents, including the
use of the FrameMaker conversion utility. Finally, once the application is used in production,
continued testing should incorporate some actual production documents.
Maintenance
While the application development effort decreases over time, some maintenance should always
be expected. In addition to needing bugs fixed, applications may be changed to accommodate
new formatting, to encompass additional documents, and to track updates to the DTD.
•Authors, editors, and graphic designers (production formatters) who will use the editing and
publishing application
•Subject-matter experts familiar with the content requirements of the documents to be
processed.
Developers include individuals with expertise in
•Markup
•FrameMaker
•XSLT
•Any other markup tools to be used
•Additional software tools, such as document management systems and database packages
Additional participants in the analysis may contribute significantly to the project definition even
if they will neither develop nor use the completed application. For example, the organization’s
Web advocate may be able to identify some requirements that do not affect the rest of the team.
The skill sets required within the implementation team include document design, markup
knowledge, setting up FrameMaker formatting templates, and setting up formatting rules that
control automatic application of the desired graphic design to structured documents. If the FDK
is used, programming skills are also needed. Of course, technical writing skills in documenting the
finished application are a valuable contribution to the completed effort.
The EDD formats the structure elements for readability: Different fields are clearly labeled, and
spacing, indentation, and different fonts emphasize the organization. You can enhance the
accessibility of information by grouping element definitions into sections and explaining them
with extensive comments. These characteristics are illustrated by the following fragment:
Structured templates
End users do not use EDDs directly. Instead, the definitions made in an EDD are extracted and
stored in a template—that is, a FrameMaker document used as a starting point for creating other
documents. Developers provide end users with a template that incorporates the structure and
format rules from a particular EDD, as well as page layout information and formatting catalogs
that define paragraph, character, cross-reference, and table styles. It may also contain sample text
and usage instructions.
In some applications, information can be formatted in several ways. For example, the same text
may need to be formatted for books with two page sizes. FrameMaker can accommodate such
requirements. If an EDD’s format rules refer to paragraph and character styles in the template’s
catalogs, new catalogs can be imported from another template to change the document’s
appearance. New page layouts, table styles, and cross-reference styles can also be imported. If the
format rules incorporate specific formatting parameters, the appearance can be changed by
importing a new EDD with different format rules.
Since both the FrameMaker rendition and the markup text file include content and element
structure, data can move between the two forms automatically. The user interface is
straightforward. The FrameMaker File > Open command recognizes XML and SGML documents.
When a user opens one, FrameMaker automatically converts the document instance to a
structured WYSIWYG document and applies the format rules of the appropriate markup
application. To write a structured WYSIWYG document to XML the user simply selects the File >
Save, or File > Save As XML... command. For SGML, the user specifies SGML when executing the
File > Save As... command.
Just as the form of a structured document parallels the form of a markup document instance, an
EDD parallels a DTD or Schema. FrameMaker can also move definitions of possible structures
between the two forms. Thus, if a new project is based on an existing XML DTD, FrameMaker can
automatically create an EDD from the DTD. For example, given DTD declarations such as
Since there is no formatting information in the DTD, no format rules are included in the
automatically generated EDD. You can manually edit this information into the EDD, or import a
CSS style sheet into the EDD. You only need to do this once, even if the DTD is revised.
It is common for a DTD to undergo several revisions during its life cycle. When you receive an
updated DTD, FrameMaker can automatically update an existing EDD to reflect the revision, and
the update process preserves existing formatting information and comments in the EDD. The
update incorporates changes to content models and attribute definitions, inserts new element
types and removes discarded ones, then generates a short report summarizing the changes so
that the application developer can review them.
If a project is not founded on an established DTD or Schema, the application developer can start
implementation by creating an EDD. Once the EDD is finished, FrameMaker can automatically
create the corresponding DTD.
Read/Write
Rules
Default
Processing
XSLT Structure
Transformation API
DTD. These conversions are shaded in the following diagrams, which also show the FrameMaker
commands that invoke them and their interaction with other data files.
Open DTD...
RWR
RWR
Save As DTD...
EDD
Template
RWR
Open SGML
SGML SGML FM
Document Document
Round-trip
Open DTD...
RWR
RWR
Save As DTD...
Generate CSS2...
EDD RWR CSS
RWR
Import CSS Styles...
Template
XSLT RWR
Open XML
XML XML FM
Document Document
Round-trip
Because FrameMaker automatically reads the structapps.fm file, writers and editors do not
need to know about the structure application file. To import or export markup documents,
however, they may need to know the names of available applications—but even this information
can be stored in a FrameMaker template or automatically selected from the document type name
of an markup document. For example, given the preceding structure application file example,
when reading an SGML document that begins:
<!DOCTYPE taskmodule SYSTEM "task.dtd">
FrameMaker uses the Maintenance application. Because that application specifies read/write rules,
the indicated read/write rules control the import. Furthermore, the Maintenance application is
stored in the resulting structured document so that the same read/write rules are used if the
document is later exported back to markup.
The information in an application definition can include:
•One or more document type names that trigger use of the application on import.
•The name of the file containing the DTD to be used for export. This field is not needed for
applications that only require import, since imported markup documents always include a
document type declaration. When it does appear, the “DTD for export” field actually contains
the name of a file containing DTD declarations (sometimes called an external DTD subset)
suitable for use in document type declarations such as the one shown in the preceding
example for the Maintenance application.
•Character encoding.
•The handling of conditional text for export to XML.
•Files containing external entities (identified by entity name or public identifier).
•An entity catalog.
•Search paths for subfiles of read/write rules and external entities.
•External cross reference handling for XML.
Legacy documents
In general, the conversion of unstructured documents to structured documents (or to markup
documents) cannot be completely automated. FrameMaker offers a utility that adds structure to
unstructured FrameMaker documents. This is done by mapping paragraph and character styles as
well as other objects—such as footnotes, cross-references, markers, and tables—to elements.
Some manual polishing of the resulting documents is expected; the amount of editing depends
on the discipline with which formatting catalogs were used in the original and on whether a
unique set of elements corresponds to each formatting tag. Since FrameMaker can read many
common word processing formats, this utility can be used to structure word processor documents
as well. Once any errors in the resulting structured document have been repaired, it can be
exported to markup. Thus, FrameMaker provides a path for converting word processor documents
to markup.
The rules for mapping between styles and elements are specified in a conversion table.
Techniques for defining the mapping are provided in Developer Reference, Chapter 4, Conversion
Tables for Adding Structure to Documents
Application delivery
Once an application has been completed, it must be delivered to the end users. The developer
can either install the completed application on the end users’ system or network, or provide
instructions for doing so. At a minimum, end users need copies of all templates and FDK clients.
If end users will be structuring existing unstructured documents, they will also need copies of all
conversion tables used. Finally, if end users will be exporting or importing markup documents,
their structure application files must be modified for the new application. They need access to the
read/write rules, entity catalog, DTD/Schema for export, XSLT style sheets, and (for SGML structure
applications only) an SGML declaration.
on elements that contain text and their immediate ancestors, such as elements for list items,
notes, cautions, emphasized phrases, and cited titles.
6.After providing format rules for a few elements, test them by using the File > Import > Element
Definitions command to import the element definitions from the EDD into the sample
document. This command reports any formatting catalog entries mentioned in format rules
but not defined in the sample FrameMaker document. Define all reported formats and glance
through the sample document to verify that the formatted elements appear as intended.
You can then return to the EDD, correcting any errors in the format rules and adding some
more before testing them again, until the sample document is completely formatted. At that
point you might want to test some other documents. After creating a base for further
development, continue systematically through the DTD, making and testing context-sensitive
format rules for all necessary elements.
7.You might need to add more read/write rules. If you change additional element tags, the original
names must be replaced by the new versions throughout the EDD, in the definitions of the
changed elements as well as in definitions that refer to those elements. To update the names
in the EDD, use the StructureTools > Import DTD command, which reprocesses the DTD
according to the current read/write rules and updates the existing EDD. It writes a report
listing the changes made.
8.To create a template from the sample document, you can delete all content and save the result.
9.Use the template to test the editing environment by adding automatic insertion rules to the
EDD, specifying, for example, that when the end user inserts a List element, FrameMaker
should automatically insert an Item element within it. Consider whether an FDK client can
provide input accelerators, such as automating frequent sequences of editing steps. You
might also want to customize the FrameMaker menus for end users, perhaps removing
developer-oriented commands or (to prevent the end user from overriding automatic format
rules) removing formatting commands.
10.For markup import, add the template to the application definition in the structure application
file, and add read/write rules for special characters and other entities. Once again, open the
markup version of the sample document, test the result, and modify the application until the
results are correct.
11.If read/write rules are insufficient to import any elements, use the structure API to develop a
client with the requisite functionality.
12.If markup export is also required, test it and add other read/write rules or structure API
functions, if necessary.
13.Once formatting, import, export, and editing functions have been tested, deliver the
completed application, along with documentation, to the end user.
1.For a specific XML document, you can include the path of the schema file in the XML using
attributes - noNamespaceSchemaLocation or schemaLocation depending on
whether your schema includes a target namespace or not.
2.To specify a Schema file for use in exporting XML, modify the structapps.fm file. Use the
Schema element as part of the XMLApplication to provide the Schema file path for
export.
3.Open the XML in Frame using a structured application. Edit it.
4.Save the XML using a structured application. The Schema element in the structapps.fm file is
output in the file and validation is performed against it.
In this workflow, a DTD is generated automatically as an intermediary file from the Schema given
in the XML document, and you do not modify it. However, you can also use a Schema file to
generate an EDD directly, or you can modify the DTD and reference it from the XML document.
When an XML document references both a Schema and a DTD, FrameMaker imports it using the
DTD, although it still validates against the Schema.
unstructured document. This command puts a row in the table for each type of FrameMaker
object and format tag used in the sample document. The initial conversion table might
appear as follows:
2.Edit the conversion table, changing entries in the second column, adding entries in the third
column, and adding new rows for higher level structures.
3.Use the conversion table to add structure to the sample document, ignoring the lack of
formatting in the resulting structured document but correcting as many structural errors as
possible by editing the conversion table and reapplying it.
4.With the StructureTools > Export Element Catalog as EDD command, extract an EDD that has
an element definition for each element type that appears in the sample document. Although
these element definitions define the content of the elements very generically—each is
allowed to contain text as well as any defined element—the EDD provides a skeleton that you
can further develop.
5.The exported EDD lists the element definitions alphabetically, according to their tags. You can
rearrange them into a logical order if desired—easily moving them around using drag-and-
drop in the Structure View—and then replace the content rules with more restrictive ones and
add format rules.
6.The sample document (and other automatically structured documents) can be reformatted by
using the File > Import > Element Definitions command from the EDD into the generated
structured document
7.Continue to finish the application, as in the previous scenario. However, since page layouts and
formatting catalogs were defined in the original unstructured document, the template
development effort does not need to be repeated.
Where to begin
If your end users do not need markup, but use structured documents only because they want the
benefits inherent in a structured authoring environment, you only need to provide them an
element definition document (EDD) and a structured template. In this case, the material you need
is contained in Part III, “Screen modes.”
If your end users need to read or write markup documents, you will probably need to develop a
structure application to modify the default translation between markup data and FrameMaker
documents. In that case, this entire manual is of use to you. The rest of Part I provides general
information on creating a structure application. Part IV, “Screen modes,” provides details of the
default translation between markup data and FrameMaker and explains how you can change this
default behavior with structure read/write rules.
For example, your company may have a large XML document database of parts information from
which it periodically needs to produce catalogs. You may want to deliver the information in
FrameMaker to take advantage of its formatting capabilities while you continue to create and
store the information only in XML. In this case, end users manipulate the catalog document in
FrameMaker, but not the source XML database. Because of this, you set up an application to
translate from XML to FrameMaker but don’t worry about the reverse.
Or assume your company needs to publish documents in print, PDF, and XML. The authors can
create the documentation in FrameMaker, paying attention to pagination and other formatting
issues as they go. When they have a final version of the documents they can save them as PDF
and XML, and the online documentation will be made from the same source as the printed
documentation.
Or perhaps your end users work with FrameMaker to create their documents, but they collaborate
with other writers who use a different authoring environment for XML documents. In this situation
your application needs both to read XML documents into FrameMaker and to write FrameMaker
to XML, so that your end users can collaborate effectively.
the EDD and the DTD with its counterpart in mind. If you have this freedom, the application
design process may be easier.
Despite the similarities in their basic approach to the creation of structured documents, XML and
SGML differ from FrameMaker in their methods of representing document content, and in the
aspects of documents they represent. In this respect, markup and FrameMaker are like ordinary
human languages that evolve from different cultures—they differ not only in the particular words
they use, but in their rules for putting words together, and even in the thoughts that can be easily
expressed with them. For documents to move between FrameMaker and markup data, the
software needs instructions to help it translate between the two languages.
Markup data and FrameMaker documents use models for structured documents that are
sometimes similar and sometimes substantially different. This chapter describes the similarities
and differences that you should understand before you can create a structure application.
Structure descriptions
In markup data, elements are defined in element declarations and attribute definition list
declarations within a document type definition (DTD). In FrameMaker elements are defined in
element definitions within an element definition document (EDD) and attributes are defined as part
of an element.
FrameMaker EDDs
In FrameMaker, the EDD in which you create element definitions is a separate document. After
creating the file of element definitions, you import the definitions into a template. A template is a
FrameMaker document that stores common pre-defined information for a set of documents. This
information includes element definitions and many other details such as paragraph formats, table
formats, page layouts, and variable definitions.
The process of importing the EDD into a template stores the element definitions in the template’s
Element Catalog. After the EDD designer has imported the EDD, it is no longer needed as a
separate document. Typically, the EDD designer retains the separate EDD document for
maintenance. End users such as writers or editors, however, don’t need direct access to the EDD.
Instead, they work exclusively with the template file.
For detailed information on creating EDDs, see Part III, “Screen modes.”
markup document, the XML and SGML standards allow for the declarations to be stored
separately and referenced from the document. The document type declaration in such a
document includes the set of declarations stored separately by referring to them as an external
entity.
A typical document type declaration has the form:
<!DOCTYPE name extid [ internal_declarations ] >
For XML, a document type declaration can have the form:
<!DOCTYPE name extid URL [ internal_declarations ] >
In these examples, name is the document type name and extid is the external identifier of an
entity that consists of a list of declarations. For XML, URL refers to the location of the external
declarations on the internet.
Important: When reading and writing XML data, FrameMaker ignores the URL statement
in the document type declaration. In FrameMaker, the structure application can include a
specific DTD, or it can use a map to resolve the public identifier for the DTD on your
system.
The declarations in the external entity are treated as though they appeared at the end of
internal_declarations. The declarations that actually appear in
internal_declarations are read before the ones in the external entity. Together, the
declarations in the external entity and in internal_declarations are the document type
declaration subset of the DTD.
There is an informal practice in the SGML community of using the term external DTD subset to refer
to this external entity and using the term internal DTD subset to refer to the declarations shown
here as internal_declarations.
In most places in this manual that use the term DTD, it can refer to either a complete DTD or to
an external DTD subset. In the few places where the distinction matters, the manual clarifies which
one is meant.
For XML, declarations can be specified in W3C's XML Schema. FrameMaker supports Schema by
mapping it to DTD, from which the definitions are mapped into EDD. Detail of the mapping are
provided in the Developer Reference, page 201: XML Schema to DTD Mapping
Elements
In both markup data and in FrameMaker, the basic building blocks of documents are elements.
Elements hold pieces of a document’s content (its text, graphics, and so on) and together make
up the document’s structure. FrameMaker distinguishes among several specific element types,
corresponding to special FrameMaker document objects such as tables or cross-references.
Markup does not make such a distinction.
Element content
The content model or declared content of a markup element and the element tag and general
rule of a FrameMaker element specify in precise terms what an element can contain. In
FrameMaker, the part of the content rule that specifies the basic element content is the general
rule.
A FrameMaker element’s general rule can be the single specifier <EMPTY> to indicate no content,
or a combination of text and child elements. Some of the special element types, such as cross-
references, do not have a separate content rule, since an element of that type always has the same
content (a single cross-reference in this case). A markup element’s content model can include
either the reserved name ANY (“anything”) or a combination of child elements. In some element
definitions in both markup and FrameMaker, the content rule also specifies what content is
required or optional and the required order of the content.
Attributes
FrameMaker and markup both provide attributes to supply additional information about an
element. For example, the DTD designer for a manual could use an attribute called version for
its book element to allow the user to specify a book’s revision status.
In FrameMaker, the attributes for an element are a part of the definition of the element itself. In
XML or SGML, the attributes for an element occur separately in an attribute definition list
declaration (ATTLIST) in the DTD.
By default, FrameMaker translates most attributes in markup data as attributes of the same name
in the FrameMaker document. However, you may decide to supply rules to change this behavior.
Some attributes in markup data represent information best represented by other means in
FrameMaker. For example, you can write a rule to specify that an attribute corresponds to a
particular property, such as the number of columns in a table, instead of to a FrameMaker
attribute.
•For information on defining attributes in an EDD, see Chapter 14, “Screen modes,” in this manual.
•For information on translating between FrameMaker and markup attributes, see Chapter 21,
“Screen modes.”
Entities
In markup, an entity is a collection of characters you reference as a unit. Entities are used for many
purposes. You can use an entity as
•shorthand for a frequently used phrase
•a placeholder for an external file containing a graphic in some special format
•a way to include multiple physical files in the same document.
FrameMaker provides several features for handling situations for which you use entities in markup
data.
Entities can be classified in various ways. For example, they can be grouped into general or
parameter entities or into internal or external entities. General entities usually occur inside a
document instance. Parameter entities usually occur inside a DTD. Internal entities have
replacement text specified directly in an entity declaration. External entities are stored in a
separate storage object (such as a data file) often identified in the entity declaration by a system
identifier, public identifier, or both.
While FrameMaker doesn’t have a single construct called an entity, it uses various mechanisms to
provide the functionality of many XML and SGML entities. Entity-like features include the
following:
Text substitution You can represent frequently repeated sequences of characters as general
entities in markup, and as variables or text insets in FrameMaker.
File management You can break large documents across multiple files and manage those files
with a single document containing general entity references in markup, and with a book file in
FrameMaker.
Graphics In markup data you often store graphics in separate files, then include them in the
document with general entity name attributes. In FrameMaker, you can store graphics and
equations externally or internally.
Special characters SGML doesn’t allow you to enter certain characters or sequences of
characters directly as data characters in an SGML document. This can happen, for example, if the
character is not in the character set of the SGML document. In FrameMaker these might be either
variables or characters in a particular font.
Note: XML: The XML specification allows the use of UNICODE text, which makes this use
of entities largely unnecessary unless required by a predefined DTD. The specification also
identifies predefined character entities which FrameMaker can translate by default.
Markup In SGML, entities may contain actual markup. Because FrameMaker is a WYSIWYG tool,
it has no concept of markup as such.
•For information on creating variables, text insets, and books, see the Using FrameMaker
•For information on translating entities to various FrameMaker constructs, see:
–Chapter 22, “Screen modes,”
–Chapter 24, “Screen modes,”
–Chapter 26, “Screen modes.”
–Chapter 29, “Screen modes.”
Documents
The XML and SGML specifications use the term document differently than it is used in FrameMaker.
A markup document has a particular set of parts in a particular order and can be spread across
multiple physical files. A FrameMaker document is simply a single file in FrameMaker format.
Markup documents
According to the XML and SGML standards, an XML or SGML document contains an SGML
declaration (SGML-only), a prolog, and a document instance set. (For more information about the
SGML declaration, see Chapter 9, “Screen modes.”)
The prolog and document instance set allowed with FrameMaker have the simplest form defined
in the standard. For a document used with FrameMaker, its prolog can contain comments,
processing instructions, and exactly one DTD. Its document instance set includes exactly one
document instance. A document instance is a particular collection of data and markup such as a
memo or book—what most users informally think of as a document.
When you open the file or files comprising an XML or SGML document, you can clearly see the
parts of the document corresponding to the SGML declaration, DTD, and document instance.
Frequently, the bulk of the DTD actually resides in a separate file as an external DTD subset and is
referenced in the document.
FrameMaker documents
Since FrameMaker is a WYSIWYG tool, a FrameMaker document is organized differently than a
markup document. A FrameMaker document contains information specified in the template from
which it was created, along with the data of the document. The template information is stored in
various catalogs, such as the Element Catalog and the Paragraph Catalog, and in special
nonprinting master and reference pages. Rather than having explicit markup that appears in the
document, it uses commands for adding structure and formatting that take effect immediately.
Multiple-file documents
Frequently, your end user wants to divide the text for a document into multiple physical files. For
example, a book may have a separate file for each chapter. Both markup documents and
FrameMaker allow a single conceptual document to be divided into multiple physical files.
FrameMaker provides the book mechanism for this purpose. A book file contains a list of files that
together form a complete work. Each file in the book is a complete FrameMaker document and
can stand on its own.
In markup, you can use text entities for the same purpose—you can have a single file with
references to text entities, each of which contains a portion of the document. In markup, each text
entity isn’t a complete document. That is, each entity doesn’t have its own DTD, and document
instance. Instead, the text entities are part of the document instance of a single markup
document.
•For information on creating FrameMaker books, see the FrameMaker user guides.
•For information on creating books from text entities, see Chapter 29, “Screen modes.”
Format rules
Markup has no standard mechanism for representing the formatting of a document, although
some DTDs use attributes for some formatting information. XML uses CSS and XSL to represent
formatting.
FrameMaker provides format rules that allow an EDD to store context-sensitive formatting
information. When you read an XML document into FrameMaker, the formatting specified in the
XSL file has no effect. However the CSS formatting can be used if required, otherwise FrameMaker
uses the formatting specified in the EDD.
FrameMaker also uses the EDD format rules when you edit a document. As you insert an element
with format rules, FrameMaker applies the appropriate format to the element’s content on the
basis of surrounding structure and attribute values. That is, FrameMaker can format the same
element in different ways, in different contexts in a document. In addition, an end user can
override formats for any portion of a document.
FrameMaker format rules can be defined hierarchically. For example, you can say that the font
family and size for Section elements are Times 12pt and for MyTab table elements they are
Helvetica 12pt. Later, you can say that the Fnote footnote element is 9pt. Since you did not
specify the font family for Fnote, it is Times if it occurs in a Section element, but Helvetica if it
occurs in a MyTab element.
•For information on creating format rules in an EDD, see Chapter 15, “Screen modes,” and
Chapter 16, “Screen modes.”
Graphics
There is no standard mechanism for representing graphics in markup data. There are several
common methods in use, in each of which an entity holds the graphic object itself.
In markup, the entity can be in an external file, written in a particular format such as Sun™ raster
format. The graphic data format is given a name called a data content notation. The entity
declaration specifies its notation.
In XML, the graphic and its file format can be represented in a an unparsed entity. Then the XML
document can use this entity as an attribute in a graphic element to include the graphic in the
document.
FrameMaker provides tools for creating a graphic. Alternatively, your users can import an external
graphic, either by copying it directly into your FrameMaker document or by referring to an
external graphic. In the latter case, the graphic remains in an external file and the name of the file
is associated with the document. FrameMaker recognizes a graphic in several file formats, such as
MIF or Sun raster format. Because FrameMaker determines the format directly by reading the
graphic, you don’t need to tell it the format of a graphic explicitly. Hence, there is no need to
attach names to the formats.
•For information on translating graphics, see Chapter 24, “Screen modes.”
Equations
As with graphics, markup has no standard mechanism for representing equations, while
FrameMaker has a complete tool for working with them. Once created, however, equations in
FrameMaker have characteristics very similar to graphics. For this reason, FrameMaker treats
equations in essentially the same way as graphics for markup import and export, and this manual
discusses them together.
•For information on creating graphics and equations in FrameMaker, see the Using FrameMaker.
Tables
FrameMaker has a complex facility for creating and manipulating tables within a FrameMaker
document, including several special element types for use in your EDD. Tables have parts such as
a title, body, rows, and cells.
Markup data doesn’t have a standard mechanism for representing tables. As a result, their
representation is unique to each DTD. In practice, many DTDs use the CALS or OASIS table model,
which is similar to the table description supported by FrameMaker. Other DTDs can have element
structure that is not automatically recognizable as a table, but that needs to format as a table.
When you create an EDD from a DTD, FrameMaker automatically recognizes the CALS table model
and creates elements of the appropriate type. If you have a different table model in your DTD,
you’ll need to supply rules to identify the table structure.
•For information on working with tables in FrameMaker, see the Using FrameMaker.
•For information on defining tables and table parts in an EDD, see Chapter 13, “Screen modes.”
•For information on translating tables, see Chapter 23, “Screen modes.”
Cross-references
A cross-reference is a passage in one place in a document that refers to another place (a source) in
the same document or a different document. While the XML and SGML standards do not explicitly
support cross-references, they do provide the declared values ID, IDREF, and IDREFS for
attributes, and attributes using these declared values customarily represent cross-references.
FrameMaker can use this model for cross-references within a FrameMaker document.
FrameMaker provides several additions to the cross-reference model suggested by XML and
SGML. You need to keep these possibilities in mind when you work with cross-references:
•For markup data, both the cross-reference and its source are elements. In FrameMaker the
source of the cross-reference can be an element but can also be a paragraph or a spot in a
paragraph.
•For markup data, attributes contain the information connecting a cross-reference to its source.
In FrameMaker you can also store the information in markers instead.
•XML and SGML allow a single attribute value to link several sources. FrameMaker requires a
separate cross-reference for each citation.
Keep in mind also that FrameMaker and markup have different views of what constitutes an
internal or external cross-reference. In FrameMaker, a cross-reference to a different file is always
an external cross-reference. In markup, cross-references to different entities in a single document
are always internal cross-references. So cross-references between components in a FrameMaker
book are considered external, but cross-references between the text entities that correspond to
those components are internal, since the entire book translates to a single XML or SGML
document.
The ID/IDREF mechanism is natural in markup data for internal cross-references, those in which
the source and the cross-reference are in the same markup document. However, it cannot be used
with external cross-references, those in which the source and the cross-reference are in different
markup documents. FrameMaker provides a single mechanism for both internal and external
cross-references.
FrameMaker represents external cross-references in XML with a variation of the ID/IDREF model.
Instead of an IDREF attribute, it uses a srcfile attribute whose value identifies the file
containing the source element as well as the value of its ID attribute.
•For information on creating cross-references in FrameMaker documents, see the Using
FrameMaker.
•For information on translating cross-references to markup, see Chapter 25, “Screen modes.”
Processing instructions
Markup data can include processing instructions to modify the treatment of a document in some
system-specific manner. FrameMaker translates most processing instructions as markers in your
FrameMaker document. It also defines a small number of special processing instructions for
handling FrameMaker markers, books, and book components. You can use XSLT or the
FrameMaker Developer’s Kit (FDK) to handle other processing instructions when reading markup
documents, but not when creating an EDD from a DTD.
•For information on handling processing instructions, see Chapter 22, “Screen modes,” and
Chapter 29, “Screen modes.”
structapps.fm file and uses it to open the XML file. This way the structured application file is
opened faster.
<?xml version="1.0" encoding="utf-8"?>
<?Fmwd AppLocation "http://cms-fm/FM9/structapps.fm" AppName
"SendMail"?>
<Mail xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="email.xsd">
<from>Asterix</from>
<to>Obelix</to>
<subject>Lost Dogmatix</subject>
<body>Please Help.</body>
</Mail>
FrameMaker uses the structapps.fm file to locate referenced files, such as read-write rules,
templates, schemas, and DTDs. If the structured application referenced files are located on a web
server FrameMaker downloads all the referenced files from the server to a temporary location on
the local disk. For the referenced files, you can use absolute paths or paths relative to the XML file
being edited. The structapps_path can point to HTTP or local paths.
You can specify the processing instruction in an XML file in one of the following three ways.
•<?Fmwd AppLocation "structapps_path" AppName "Application"?>
FrameMaker silently reads the structapps.fm file from the location specified in the
structapps_path and associates the specified application at the time of opening and saving an
XML file. If the application is not specified in the structapps.fm file, FrameMaker opens or
saves the XML files with no application.
•<?Fmwd AppLocation "structapps_path" ?>
FrameMaker silently reads the structapps.fm file from location specified in the
structapps_path at the time of opening or saving an XML file. Since the structured application
is not specified, FrameMaker will prompt you to select one of the applications specified in the
structapps.fm file.
•<?Fmwd AppName "Application"?>
FrameMaker uses the current structapps.fm file but uses the application name specified in
the processing instruction of the XML file.
When you create an EDD, you can use FrameMaker variables as references to repeated content.
When FrameMaker translates the EDD to a DTD, it does not convert these variables to
corresponding parameter entities.
Before building a structure application that is designed to work with XML, you should understand
the specific differences between XML and the FrameMaker document model. For a discussion
about markup in general, see Chapter 7, “Screen modes.”
For a given encoding, character support in markup tokens is further limited by the set of reserved
characters. To see which characters are reserved for FrameRoman encoding, refer to the online
manual, FrameMaker Character Sets and note the reserved characters in the standard character set.
For more information, see Developer Reference, page 27: Specifying the character encoding for
XML files.
Namespace declaration
FrameMaker supports the use of namespace declarations in XML. A namespace can be declared
as an element attribute in the DTD, or it can be declared in a given element within the document
instance.
FrameMaker does not require you to declare namespace attributes in the EDD.
In FrameMaker you can enable or disable namespaces in the XML structured application. To see
namespace information, you can choose Element > Namespaces to display the NameSpaces
dialog box. Or namespace information may appear in the structure view elements that declare
namespaces. The display of namespace information in FrameMaker depends on whether
namespaces are enabled, as well as how the namespaces are declared in the DTD.
For a structure application with namespaces enabled:
•When a namespace is declared in an element but not in the DTD, the namespace information
appears in the Namespaces dialog box. The structure view shows an asterisk for the element
that has the namespace declaration.
•When a namespace is declared in an element and is also declared in the DTD, the namespace
information appears in the Namespaces dialog box. The structure view shows the namespace
as a valid element attribute with no value. The structure view also shows an asterisk for the
element.
•When a namespace is declared in the DTD, but is not declared in any element, the structure view
shows the namespace as a valid attribute with no value.
For a structure application with namespaces disabled:
•When a namespace is declared in an element but not in the DTD, the structure view shows the
namespace as an invalid attribute, with the URI as the attribute value.
•When a namespace is declared in an element and is also declared in the DTD, the structure view
shows the namespace as a valid attribute, with the URI as the attribute value.
•When a namespace is declared in the DTD, but is not declared in any element, the structure view
shows the namespace as a valid attribute with no value.
When you export the FrameMaker document to XML, the namespace information is written to the
XML.
Note: XML Schema: You must enable namespaces to allow FrameMaker to validate XML
against a Schema definition upon import and export. Schema allows an XML document to
reference multiple Schema locations in different namespaces. When this is the case, only
the first namespace is used. See Developer Reference, page 201: Schema location for
additional information.
Rubi text
Japanese text uses a form of annotation known as Rubi to express the phonetic representation of
a word over the characters used to spell the word. The XML specification suggests a
representation for Rubi as follows:
<ruby>
<rb>Oyamoji text</rb>
<rt>Rubi text</rt>
</ruby>
To import that representation you would need read/write rules similar to the following:
element "ruby" is fm rubi group element "MyRubiGroup";
element "rb" is fm rubi element "MyRubi";
element "rt" is fm rubi element "Oyamoji";
For more information, see “Screen modes” on page 162.
Supported encodings
FrameMaker ships with support for the following encodings, listed by their IANA names:
IsoLatin1 TXIS
Ascii TASC
Ansi TANS
Shift-JIS TSJS
Big5 KSC_5601
TBG5
GB2312 UTF-8
TGB
Korean TKOR
EUC-JP Shift_JIS
EUC-KR US-ASCII
EUC-TW UTF-16
ISO-8859-1 windows-1252
Using these IANA names, you can specify any of these encodings for export to XML—see
Developer Reference, page 27: Specifying the character encoding for XML files.
These encodings are created in the ICU (International Components for Unicode) format, and
stored as .cnv files. The supplied encodings are stored in the following location:
$installdir\fminit\icu_data
You can add other ICU encodings to the FrameMaker installation—you must create ICU compliant
mappings and save them as .cnv files, then store them in the icu_data directory. Once you
install a new encoding, you can refer to it the same as you refer to the other export encodings.
FrameMaker associates a given ICU encoding to an internal display encoding that is appropriate
for a given language. Because any number of languages can be used in an XML file, FrameMaker
cannot make that association automatically. The XML document prolog specifies an encoding, but
the document may contain elements or other constructs that override the language implied by
that encoding.
As of this writing you can find more information about International Components for Unicode
(ICU) at http://www-124.ibm.com/icu/.
Before building a structure application that is designed to work with SGML, you should
understand the specific differences between SGML and the FrameMaker document model. For a
discussion about markup in general, see Chapter 7, “Screen modes.”
SGML declaration
According to the SGML standard, an SGML document contains an SGML declaration, a prolog, and
a document instance set. The SGML declaration includes information on the specific syntax in effect
for the document. In the absence of an SGML declaration, your SGML applications can use the
reference concrete syntax defined in the SGML standard.
that information was tagged as conditional text in a FrameMaker document or that it occurred in
a marked section in an SGML document.
When reading an SGML document, if the SGML parser used by FrameMaker encounters a marked
section declaration with the effective status IGNORE, it doesn’t include that section. If the
effective status is INCLUDE, CDATA, or RCDATA, the software appropriately interprets and
translates the marked section. The software doesn’t annotate marked sections in the resulting
EDD or document. Since your modifications only affect documents after they have passed through
the parser, you cannot modify this behavior.
Similarly, if FrameMaker encounters conditional text that is hidden when writing a FrameMaker
document as SGML, it does not include that text in the SGML document. All other text, whether
it is unconditional or conditional, is included in the SGML document. Conditional text is not
annotated in any particular way in the resulting DTD or document. You can write a Structure API
client to change the exported document instance to reflect condition tags.
For information on working with conditional text, see the Using FrameMaker.
This chapter describes the major tasks you’ll perform to create a structure application and
describes the pieces your application might contain. Much of your work in creating an application
involves writing read/write rules to modify the software’s default behavior. Part IV, “Screen
modes,” describes specific default behaviors and explains how you can change them.
The diagram shows your completed structure application at work. Information in the application
funnels into the Open and Save As commands in FrameMaker, adapting their default translation
behavior to your markup and FrameMaker environments. Your structure application has
information (such as a DTD) specific to the markup representation of documents, other
information (such as an EDD) specific to the FrameMaker representation of documents, and rules
and definition to bridge this information. The application pieces are described in more detail in
“Screen modes” on page 121.
Structure
Markup Environment FM Environment
application
SGML Declaration EDD
Read/Write
Rules
DTD or Schema
Application
Definition
Entities FrameMaker
Template
FrameMaker
Open/Save As Commands
Yes No
Do you have a DTD
as your starting
point?
Do you have an
Yes existing EDD as No
your starting
point?
Create initial EDD from DTD. (3) Create initial DTD from EDD. (5)
You have an initial EDD and an initial DTD for your application.
The following notes give more detail on some of the steps in the chart. Note numbers match the
chart numbers.
•what end users need in terms of access to both FrameMaker and markup versions of the same
document
•the environment (XML, SGML, or FrameMaker) in which documents will be created and delivered
•whether end users work with only one structure application or multiple applications
(3) Create an initial EDD from your DTD, if you have one.
If you’re starting with a DTD, choose StructureTools > Open DTD to create an initial EDD to see
how the software translates your DTD with no help from your application. You use this initial EDD
during your analysis to see how you want to translate markup constructs into FrameMaker
constructs.
In the absence of read/write rules, FrameMaker translates:
•Markup elements to FrameMaker elements of the same name—For SGML the FrameMaker
element names receive initial capitalization; for XML the FrameMaker elements are the same
case as the element and attribute declarations.
•Markup attributes to FrameMaker attributes, assuming that attributes contain extra information
about their associated elements
•entities to various constructs such as FrameMaker variables
The software produces a log file if it encounters any problems while processing your DTD.
If your XML declarations are in Schema, you can specify the Schema file in the application
definition, and FrameMaker automatically maps the information to DTD and creates the DTD file
for you when you import a document. In general, types are converted on load to DTD-equivalent
types. A general warning is shown if there are any unsupported constructs in the Schema that
cannot be converted to DTD.
semantics available in an EDD, you should first create an EDD and its associated FrameMaker
template and then continue the development process from there.
If you’re starting from scratch and the sample documents you intend to use are unstructured
FrameMaker documents, you may want to do this step in conjunction with the next major task.
Yes
No Do you have sample Are your sample
documents? documents in
markup?
Yes
No
No Are your
Are your sample
sample documents No
documents structured
unstructured FrameMaker
FrameMaker
Create sample documents?
documents?
documents from Yes
scratch. (6)
Yes
The sample documents you need depend on your starting point. For example, if you already have
markup documents, you probably won’t yet have FrameMaker documents. If you have existing
unstructured FrameMaker documents, you may need to structure them. Later in the process, you
may decide to create more sample documents.
You have an initial EDD, DTD, and sample documents for your application.
Use your modified application to create a new version of the EDD or DTD from the
current DTD or EDD. (11)
If you’re making a DTD from an EDD, correct syntax If you’re making an EDD from a DTD, add any new
errors uncovered by the parser. (12) format rules to EDD and import EDD to template. (13)
Test opening and saving sample documents as appropriate for your end users. (14)
Yes
Determine the purpose of elements with a declared content of EMPTY. These will translate to
the appropriate FrameMaker constructs, such as graphic elements.
2.Examine attribute use.
Examine attributes to distinguish attributes that control formatting from attributes that
simply provide information about the associated element. Formatting attributes for special
constructs such as tables or graphics may become formatting properties in a FrameMaker
document.
3.Examine entity declarations.
Determine how entities are used and which become text, variables, graphics, book files, or
special characters in FrameMaker. The SGML standard defines several sets of character
entities. Check whether your DTD refers to any of these character sets. Some XML DTDs also
use character entities although not necessary in most cases.
4.Examine notation declarations.
Determine how to represent non-SGML or non-XML data (NDATA) in FrameMaker. NDATA can
often be represented directly as FrameMaker graphic or equation elements.
5.Examine elements and attributes used as cross-references.
FrameMaker assumes markup attributes with declared value of ID or IDREF refer to cross-
references. Your DTD may also use other declared values, such as IDREFS, NAME, and NAMES,
for cross-references.
Note: SGML: The SGML standard allows wide variations in the actual markup of specific
documents. For example, it allows variations in the maximum length of the sequence of
characters specifying a name, in the case-sensitivity of names, and in markup that may be
omitted altogether. This is specified in the SGML declaration. If the parser encounters
errors in the DTD, you may be able to fix them by changing the quantity and capacity
limits defined in the SGML declaration used by the current structure application.
Modify the SGML declaration using a text editor to correct these errors. Add the SGML
declaration to the application definition. Rather than recreating the DTD with the modified
application, you can manually invoke the SGML parser to validate your changes.
(13) Add format rules to the EDD and import it into the
template.
If you started with a DTD, you (perhaps working with your document designer) now expand the
EDD and FrameMaker template to include appropriate format rules.
FrameMaker supports context-sensitive formatting. An element definition can have one or more
format rules that specify formatting applied to the element in a particular context in the
document. For example, a Head element inside a single Section element might be formatted
differently than a Head element inside a Section element that’s nested in another Section
element. (That is, a first-level heading probably looks different from a second-level heading.)
No
Even if you need to write a structure API client, you should use read/write rules for as much of the
translation as possible. This will simplify what your client must do.
SGML declaration
Note: XML: The XML specification does not support user-defined SGML declarations.
The following discussion is for SGML, only.
An SGML structure application can use a particular SGML declaration. If it does, you specify the
SGML declaration in the application definition.
The SGML declaration is an optional part of an application. Individual SGML documents can begin
with a declaration. If neither the SGML structure application nor a particular SGML document
specifies a declaration, FrameMaker uses the SGML declaration described in the Developer
Reference, page 225: SGML Declaration
If you do specify an SGML declaration, you can deliver it to end users as a separate file.
FrameMaker template
A structure application is associated with a particular FrameMaker template that you can specify
in the application definition. The software uses the template to specify the structure and
formatting of FrameMaker documents it creates from markup documents. If you do not specify a
template, it uses the formats you would get if you used the File > New command and specified
Portrait, rather than a particular template.
As you create your application, you can work with a FrameMaker EDD in a separate file. However,
FrameMaker does not use a separate EDD file to find information on structure when opening a
markup document; it gets the information directly from the FrameMaker template. At some point
during the creation of the FrameMaker template, you must import element definitions from the
EDD to the template. Because of this, you don’t deliver the EDD to your end users as a separate
file. For maintenance purposes, however, you should retain the EDD in a separate file.
Entity catalogs
If your application requires special external entities or entity catalogs, you must deliver those as
separate files to your end users. For information on entities and entity catalogs, see Chapter 22,
“Screen modes,” Chapter 11, “Screen modes,” and Developer Reference, Chapter 10, ISO Public
Entities
Documentation
As part of your structure application, you should write documentation to explain to your end users
how to use the application. It is your responsibility to deliver such documentation either in online
or printed form.
This manual is written for developers creating structure applications. Refer end users to the
FrameMaker User Guide. You can remove this manual from your end users’ installation directory.
Transformation file
An XSL transformation includes information such as XSL, Parser, and Output folder, for creating
output from XML files. Application-specific transformations are stored in an XML file that you
specify for the structured application in the structapps.fm file. A transformation file thus
includes your application-specific XSL transformation scenarios.
Configuration file
A structured application may include an XML configuration file. This configuration file is optional
and contains attributes with their suggested and default values. When opening a structured
application, FrameMaker reads the corresponding configuration file if it exists, and automatically
populates the attribute values. Users can choose to edit attribute values using the Configuration
File editor.
MathML
Namespace prefix
You may choose to use a prefix for all MathML elements in your structured application. To use a
namespace prefix for the MathML elements in your XML files, declare the MathML namespace
prefix in your structured application.
Export entities as values
Prior to the FrameMaker 2015 release, MathML equations were saved as entities in XML. With the
current release of FrameMaker, MathML equations are saved as Hex values. By default, the export
entities as values construct is set to true. If you set the value of this construct to false, then
FrameMaker might fail to load a file that contains a MathML equation.
ultimate content of your documents. By using a template, you ensure all documents for a specific
application can have the same element definitions and formatting. For information about
importing element definitions into your template, see “Screen modes” on page 167
For information on creating a FrameMaker template, see the FrameMaker User Guide. For
information on creating the EDD for a template, see Chapter 12, “Screen modes.”
Following are descriptions of information you can put in your template that takes advantage of
document structure. Included are descriptions of building blocks that define cross-reference
formats, variable definitions, and format generated lists and indexes, as well as map FrameMaker
elements for HTML export. For general information about cross-reference formats, variable
definitions, generated lists and indexes, and HTML export, see the Using FrameMaker.
Cross-reference formats
Use the following building blocks to create cross-reference formats that refer to FrameMaker
elements:
<$elemtext> The text of the source element (up to the first paragraph break),
excluding its autonumber, but including any prefix and suffix
specified in the element definition
<$elemtextonly> The text of the source element (up to the first paragraph break),
excluding its autonumber and any prefix and suffix specified in
the element definition
<$elemparanum> The entire autonumber of the source element’s first paragraph (or
of the paragraph containing the source element), including any
text in the autonumber format
<$attribute[name]> The value of the attribute with the specified name (or, if no value
is specified, the default value)
You can specify building blocks to refer to the ancestor of the source element. Including the tag
of an element in the building block indicates that it will refer to the nearest ancestor with the
specified tag. For example, a cross-reference to a subsection might also identify its parent section,
as in the following: See “Types of plate boundaries” in “Plate tectonics.”
The following list shows how building blocks refer to ancestors of the source element:
<$elemtext[tag]> The text of the nearest ancestor (up to the first paragraph break)
with the specified tag, excluding its autonumber, but including
any prefix and suffix specified in the element definition
<$elemtextonly[tag]> The text of the nearest ancestor (up to the first paragraph break)
with the specified tag, excluding its autonumber and any prefix
and suffix specified in the element definition
<$elemtag[tag]> The tag of the nearest ancestor with the specified tag
<$attribute[attrname:tag]> For the preceding elements that are first siblings, then ancestors
of the source element, the value of the attribute with the
specified name (or, if no value is specified, the default value)
In each of the building blocks, enter the tag of the element to which you want to refer between
brackets. For example, if you want to refer to the text of the source’s nearest ancestor tagged
Section, you would use:
<$elemtext[Section]>
Variables
If you’re defining running header/footer variables that will refer to elements in structured
FrameMaker documents, you can use building blocks that refer to elements or element attributes
rather than to paragraphs.
The following building blocks in running header/footer variables refer to an element tag:
<$elemtextonly[tag]> The text (up to the first paragraph break), excluding its
autonumber and any prefix and suffix specified in the element
definition
<$highchoice[name]> The highest value of the attribute that appears on the page
(where highest means the value closest to the bottom of the pop-
up menu on the right side of the Attributes window)
<$lowchoice[name]> The lowest value of the attribute that appears on the page (where
lowest means the value closest to the top of the pop-up menu on
the right side of the Attributes window)
Follow these guidelines for using element attribute value building blocks:
•Enter the name of the attribute whose value you want to display between brackets. If a list of
possible values is not defined for the attribute used in a <$highchoice> or <$lowchoice>
building block, the building block will be ignored.
•You can specify elements to consider when searching for an attribute value to include in the
running header or footer. To do so, place a colon after the attribute name, followed by one or
more element tags separated by commas. For example, a variable with the following definition
would display the highest value of the Security attribute of the first-level and second-level
Section elements.
<$highchoice[Security:Section(Level1), Section(Level2)]>
<$elemtext> Displays the text of the first paragraph of the element, excluding any
autonumber, but including the element’s prefix and suffix, if any.
For general information about how FrameMaker generates and formats lists and indexes, see the
FrameMaker user’s manual.
You can also associate HTML mapping with an EDD. To do this, create a reference page in your
EDD named EDD_HTML. Then copy the mapping information from the HTML reference page of
your template to the EDD_HTML reference page. If your EDD includes the ImportHTMLMapping
element, then the mapping information will be copied to any document that imports your EDD.
For more information about including mapping information with an EDD, see “Screen modes” on
page 153
In the above example, the following syntax is used to specify FrameMaker elements and attributes
in the column titled FrameMaker Source Item:
E:elementname, where elementname is the name of the element
A:attributename, where attributename is the name of the attribute
Note the following points when mapping a structured document to HTML:
•In unstructured documents, there is a Headings reference page which maps specific paragraph
formats to HTML headings, and assigns a hierarchy to them. In a structured document there is
no need for the Headings reference page. You map FrameMaker elements to HTML headings
in the Mapping table. The hierarchy is determined by the context of the FrameMaker element,
just as context can determine the formatting of a FrameMaker element.
•The document can be divided into separate web pages at certain levels of hierarchy. In the
above example, HTML export will create a new web page for every section of a level 1, 2, or 3.
•In unstructured documents, you map paragraph formats to list items, and specify the list type
for that list item’s parent. In a structured document, you specify the list type for FrameMaker
list element, and then you map FrameMaker list items to the HTML <Li> element. Also, you
do not specify the nesting of lists, since that can be determined by the hierarchy in the
FrameMaker document. In the above example, List maps to HTML <Ol>, and ListItem
maps to HTML <Li>. If ListItem contains a List, on export to HTML the lists will nest
correctly.
•In the above example, the Description attribute in FrameMaker maps to the alt attribute
for HTML elements. Every occurrence of a Description attribute will result in an alt
attribute in HTML, whether it is valid for that HTML element or not. The HTML specification says
that User Agents should ignore attributes they don’t understand, so this is not a major problem
unless you need to validate your HTML file. For HTML elements that use the alt attribute
(<IMG>, for example) your description can appear in place of that element.
<$elemtextonly> The text of the source element (up to the first paragraph break),
excluding its autonumber and any prefix and suffix specified in the
element definition
<$elemparanum> The entire autonumber of the source element’s first paragraph (or of
the paragraph containing the source element), including any text in the
autonumber format
<$elemparanumonly> The autonumber counters of the source element’s first paragraph (or of
the paragraph containing the source element), including any
characters between the counters
<$attribute[name]> The value of the attribute with the specified name (or, if no value is
specified, the default value)
This chapter discusses the special files you need to create a structure application. It tells you where
to look for them in your directory tree; describes the workings of two of them, the application
definition file and the log file; and points you to the appropriate chapters for information on the
other files.
default.rw The default read/write rules file. FrameMaker uses this file in the absence of a
rules file in the current application. It also uses the file as the template when
you create a new rules file with the StructureTools > New Read/Write Rules
File command.
structapps.fm The default master version of the application definition file.
entfmts Default formats used for ISO public entities. For information on this file, see
Developer Reference, Chapter 10, ISO Public Entities
sgml/ A directory containing SGML structure applications.
sgml/docbook/ The SGML DocBook starter kit files. For information on this directory, see the
online manual Using the DocBook Starter Kit.
sgml/isoents/ Other ISO public entity files. For information on the contents of this directory,
see Developer Reference, Chapter 10, ISO Public Entities
xml/ A directory containing XML structure applications.
xml/DITA/ The DITA XML application files.
xml/xdocbook/ The XML DocBook starter kit files. For information on this directory, see the
online manual Using the XDocBook Starter Kit.
xml/isoents/ Other ISO public entity files. For information on the contents of this directory,
see Developer Reference, Chapter 10, ISO Public Entities
xml/xhtml/ The XHTML starter kit files. For information on this directory, see the online
manual Using the XHTML Starter Kit.
If you choose, you can create other directories under $STRUCTDIR to hold files for your
applications.
or a relative path:
<image file = "image.jpg"/>.
FrameMaker opens a referenced file if it is a FrameMaker file or a supported format, such as a text
file.
Note that the $STRUCTDIR variable still points to the master copy of the structapps.fm file
in the FrameMaker installation directory.
There are multiple advantages of using two different copies of the structapps.fm file. As an
administrator, you can use the master copy to propagate structapps.fm changes to multiple
users. As a user, you can change an application definition in the user copy to override the same
in the master structapps.fm file. If you want to make changes only to a single application
while inheriting other applications' behavior from the master copy, ensure that you delete those
definitions from the user copy.
In the non-administrative mode on your machine, you may have to copy all the application
files to a new location because they may not be writable. In such a case, you can either
edit the user copy of the structapps.fm to specify the path to the new directory or
edit the path mapped to $STRUCTDIR in maker.ini to point to the new directory with the
structure files.
documentation and may at other times need an application based on a completely different DTD
particular to your company. If so, you provide two applications in one structapps.fm file.
The structapps.fm file provides definitions for the available applications; it can also contain
information relevant to all applications, such as a default place to look for entity files. These file
paths can also be HTTP paths if the files reside on a WebDAV-enabled server.
FrameMaker can associate a particular document with a structure application in several ways:
•An EDD can explicitly associate itself with a structure application. If it does, all FrameMaker
documents that use that EDD are automatically associated with the application.
•A structure application can name one or more document types (identified in the markup in the
doctype declaration and in the document’s root element). If it does, all markup documents that
use one of those document elements are automatically associated with the application.
•If neither of the above occurs or if the associations are ambiguous, FrameMaker asks the end
user to pick a structure application to use with a document.
A full description of each available element in the structured application definition document can
be found in Developer Reference, Chapter 1, Structure Application Definition Reference.
The Read Application Definitions command re-reads both the structapps.fm files and
merges the application information from the two files. If an application is defined in both the user
and the master copy, the application definition in the user copy is given precedence. This
command replaces the current list of structure applications stored in memory with the
applications defined in the current structapps.fm file.
Log files
FrameMaker log files give you information used to identify and correct errors in your application.
application to check the validity of the rules document in that application. The command can find
many potential problems and most fatal errors.
Part II explains how to develop an element definition document (EDD) and define elements in it.
If you’re developing an EDD as part of a larger structure application, you should be familiar with
Part II, “Screen modes,” before using the material in this part.
The chapters in this part are:
•Chapter 12, “Screen modes”
Discusses the process of developing an EDD—from creating a new EDD through building a
structured template from your element definitions. Read this chapter first for an overall
understanding of the process.
This chapter lists all elements in an EDD’s Element Catalog. It provides links to sections where
the elements are covered in the syntax chapters, which describe specific types of rules, and
show examples of these constructs in element definitions:
–Chapter 13, “Screen modes”
–Chapter 14, “Screen modes”
–Chapter 15, “Screen modes”
–Chapter 16, “Screen modes”
–Chapter 17, “Screen modes”
An element definition document (EDD) contains the structure rules, attribute definitions, and
format rules for all of the elements in a group of FrameMaker documents. You write and maintain
the definitions in the EDD and then convert them to an Element Catalog in a structured template.
To work with the elements, end users create documents from the template or import the formats
from an existing document into a new document.
You can start a new EDD in two ways. If you have a DTD that your end users’ documents will follow,
you can begin with the DTD and create an EDD with element definitions that correspond to
constructs in the DTD. If you do not have a DTD, or if you do not plan to translate structured
documents to markup, you can create an EDD and write its definitions entirely in FrameMaker.
An EDD is a regular structured FrameMaker document—it has an Element Catalog already set up
with everything you need to define elements for end-users’ documents. When developing the
EDD, you insert elements from the catalog and in most cases provide values to fill out the
definitions. For general information on working in structured documents, see the Using
FrameMaker.
In this chapter
This chapter explains the process of developing an EDD and provides a summary of the elements
in the EDD’s Element Catalog. It contains these sections.
•A first look at the steps for developing an EDD:
–“Screen modes” on page 140
•How to start or update an EDD:
–“Screen modes” on page 141
–“Screen modes” on page 144
•Summary of the elements you work with in an EDD:
–“Screen modes” on page 145
•How to define elements and supply other information about them:
–“Screen modes” on page 153
–“Screen modes” on page 154
–“Screen modes” on page 156
–“Screen modes” on page 166
•What to do when you’re finished developing an EDD:
If you start the process with a DTD, FrameMaker creates a new EDD with definitions that
correspond to the declarations in the DTD. In most cases, as part of this conversion you need to
analyze the EDD and DTD together, develop read/write rules, and repeat the process until the
translation is complete. You’ll probably at least need to add format rules to the definitions in the
EDD.
If you do not have a DTD, you can either export the Element Catalog from an existing FrameMaker
document to create a new EDD or create a new empty EDD by selecting StructureTools > New
EDD. Then you either edit the definitions of the exported elements or write new element
definitions from scratch.
When you’re finished writing and editing element definitions in the EDD, you import the
definitions into a FrameMaker template, which also stores formats that may be referenced in your
format rules. (You may need to coordinate this part of the process with a template designer
responsible for formatting information.) Then you test the template on sample XML or SGML
documents, revise the definitions in the EDD, reimport the definitions into the template, and
repeat the process as necessary until you have a template that works the way you want it to.
Finally, you deliver the structured template to end users—in many cases, along with other pieces
of a larger XML or SGML application. If you didn’t start from a DTD but your users will export
documents to markup data, you also need to save the EDD as a DTD.
At the end of the process, even though you are finished developing the EDD, you should normally
keep it as a separate document to use for maintaining the element definitions.
using the rules (see “Screen modes” on page 143), test the results on sample markup documents,
and repeat the process as many times as necessary. You may find it easiest to write and test only
a few rules during each iteration. For a more detailed discussion of this process, see “Screen
modes” on page 115.
You develop read/write rules in a special rules document that is part of a structure application.
When you create an EDD from a DTD, you can specify which application (and hence which set of
rules) to use with the EDD. For information on developing a read/write rules document, see
Chapter 19, “Screen modes.”
An application definition file (such as structapps.fm) describes what files are used in each
structure application you deliver to an end user. If necessary, update an application definition in
this file so that the application uses the appropriate read/write rules document. To do this, insert
a ReadWriteRules element in the definition and type the pathname of the document. For
more information, see “Screen modes” on page 133.
the default translation may not convert all of the markup elements correctly. (An exception to this
is CALS tables. If your DTD uses the CALS table model, FrameMaker does recognize those elements
as table elements.) You can modify the default translation using read/write rules.
For details on the translation of each type of element, see Part IV, “Screen modes.”
A log file is initially locked so that you can click in it to use the hypertext links. If you want to save
the log file, you must first unlock it by pressing Esc Flk. (Press Esc Flk again to relock the file.) For
general information on FrameMaker log files, see “Screen modes” on page 135.
•element definitions for all of the elements from the document’s catalog
Exporting an Element Catalog is helpful when you already have a structured document that you’d
like to use as a basis for other documents. You will probably need to add or edit element
definitions in the new EDD.
To export an Element Catalog to a new EDD, choose Export Element Catalog as EDD from the
File>Developer Tools menu in the structured document with the Element Catalog.
The exported EDD and the EDD from which it was created are equivalent in that they have the
same element definitions. The two EDDs may differ, however, in the order and grouping of
definitions. Section, Head, and Para elements from the original EDD are also not preserved in
the exported EDD.
High-level elements
The highest-level element in an EDD is ElementCatalog. It can have the following child
elements, in the order shown. Only the Version element is required. ElementCatalog and
the required Version are inserted automatically, along with the optional CreateFormats and
Element, when you start a new EDD.
ElementCatalog
Version
StructuredApplication
(0 or 1 of this)
CreateFormats or DoNotCreateFormats
(0 or 1 of these)
ImportHTMLMapping or DoNotImportHTMLMapping
(0 or 1 of these)
Section
(any number, 0 or more, of these)
FormatChangeListLimits
(0 or 1 of these)
The Version element displays the number of the FrameMaker release used when the EDD was
created; the number is not editable. The following child elements are optional:
•StructuredApplication: Specifies an SGML or XML application for the EDD and for
documents that use the EDD. You need to type the name of the application. See “Screen
modes” on page 154
•CreateFormats or DoNotCreateFormats: Specifies whether or not to create formats
automatically when you import element definitions into a template or other document.
CreateFormats is inserted automatically in a new EDD. See “Screen modes” on page 153.
•ImportHTMLMapping or DoNotImportHTMLMapping: Specifies whether or not to import
the EDD’s HTML mapping table into a document when you import the element definitions into
a template or other document. See “Screen modes” on page 153.
•Element: Begins the definition of an element. See “Screen modes” on page 156.
•FormatChangeList: Begins the definition of a named format change list. You can use one of
these lists to describe a set of changes to format properties and then refer to the list from
element definitions. This is helpful when two or more elements use the same set of changes
because you need to describe the changes only once. See “Screen modes” on page 235.
If you do not want documents to import the EDD’s mapping table, select the
ImportHTMLMapping element and change it to the DoNotImportHTMLMapping element.
When exporting a document’s element catalog as an EDD, if the document has a mapping table
on the HTML reference page, it will export that table to the EDD, and the EDD will contain an
ImportHTMLMapping element.
For information on HTML mapping tables, see Using FrameMaker.
Important: The DTDs for SGML and XML are significantly different. For this reason you
should always use XML structure applications for XML files, and SGML structure
applications for SGML files.
When you first convert a DTD to an EDD using StructureTools > Open DTD, you can select a
structure application for the EDD. The new EDD has a StructuredApplication element with
the name of the application. If you select <No Application> when you convert the DTD, the
new EDD does not have this element.
To set a structure application in an EDD that does not have an application, insert a
StructuredApplication element and type the name of the application. This element must
come before any sections, paragraphs, element definitions, and format change lists. To change an
application already set in an EDD, edit the name in the StructureApplication element.
All documents that use the EDD are also associated with the structure application. Users can
change to a different application in an individual document by using the Set Structure Application
command (File menu).
For information on the parts of a structure application and the process of developing one, see
Chapter 10, “Screen modes.”
Sections are particularly useful when an EDD has many definitions. You may want to group and
label the definitions by element type, with format change lists in another section. For example,
your sections might be named Containers, Tables, Objects, and Format Change
Lists.
Add explanatory paragraphs wherever needed to provide descriptive information about a group
of elements. This information can be helpful to someone maintaining the EDD later. (You can also
add comments to individual element definitions. See “Screen modes,” next.)
This example shows a part of an EDD that is organized in a section and has an introductory
paragraph for the section:
Head
Rules
Don’t begin tags the same way unless you need to for grouping. A user can usually find elements
in the catalog if the tags are distinct, and the user may want to type in a unique beginning string
to identify a tag for a quick key command (such as Control-1 for Insert Element).
Note: SGML: If you plan to export documents to SGML, define element tags that
conform to the naming rules and the maximum name length permitted by the concrete
syntax you’ll be using in SGML. If you prefer tags that do not adhere to the SGML
conventions, you can provide read/write rules to convert them to SGML equivalents when
you export. For more information on element names in SGML, see “Screen modes” on
page 299.
Tables, table parts (titles, headings, bodies, footings, rows, and cells), and footnotes are similar to
containers in that they can hold child elements and in some cases text. But these elements are for
a specific purpose—for a table or a footnote—and can be used only for that purpose in a
document.
An element definition for a container, table, table part, or footnote specifies a unique element tag
and element type and can also have any of these items:
•A comment that describes the element
•Content rules that describe valid contents for the element or its descendants (the general rule
part of this is required). For each structured flow in the documents, at least one container needs
a rule specifying that the element is valid at the highest level
•For a container, additional structure rules that provide initial contents for new instances of the
element. For a table, a tagging pattern that specifies the element tags assigned to the rows and
cells an end user creates with a new table
•Attribute definitions that specify attributes to store descriptive information with the element
•Text format rules that determine how to format text in the element or its descendants
•For a table, an object format rule that determines an initial table format for new instances of the
element
Examples
These are definitions for containers, tables, table parts, and footnotes:
Basic steps
This section gives an overview of the steps for defining a container, table, table part, or footnote.
Refer to the chapters that follow for detailed descriptions of the syntax and more examples.
Note that the steps in this section suggest an order for the rules in a definition, but in some cases
you can write the rules in a different order. (For example, the element for highest-level validity can
go before or after the general rule.) Use the Element Catalog as a guide for inserting elements in
a valid order.
1.Insert an Element element in the highest-level element of the EDD (ElementCatalog)
or in a Section. Then type a tag in the Tag element.
When you insert Element, the Tag child element is inserted automatically. For guidelines on
providing a tag, see “Screen modes” on page 156.
2.(Optional) If you want to include a comment for the definition, insert a Comments element
before Tag and type the comment.
The comment appears just above the definition’s tag line. If you include a comment, place the
insertion point right after Tag when you’re finished.
3.Insert an element to specify the element type.
An element type determines what other child elements will be available as you write the
definition.
When you insert one of these elements, the name of the type appears in parentheses before
the tag and a GeneralRule child element is inserted automatically.
4.Type the general rule in the GeneralRule element to define allowed contents for the
element.
A general rule describes the child elements the element can contain, whether the child
elements are required or optional, and the order in which the child elements can occur. It also
specifies whether the element can have text.
If you do not specify a general rule, FrameMaker gives the element a default general rule that
depends on the element’s type. To use a default rule, leave the GeneralRule element
empty (but do not delete GeneralRule or the definition will be invalid). These are the
default general rules:
For information on the syntax and restrictions of general rules, see “Screen modes” on
page 175.
5.(Optional) Define other content rules as necessary.
Every structured flow in a document needs one highest-level container element. If the
element you’re defining is a container, you can insert a ValidHighestLevel child element
to allow the element to be at the highest level. For more information, see “Screen modes” on
page 180.
SGML, only: For a container, table, table part, or footnote, you can define inclusions and
exclusions. An inclusion is an element that can occur anywhere inside the defined element or
its descendants, and an exclusion is an element that cannot occur anywhere in the element
or its descendants. For each element you want to include or exclude, insert an Inclusion
or Exclusion element and type the element tag. For more information, see “Screen modes”
on page 180.
6.(Optional) Write additional structure rules to specify initial contents or tagging for new
instances of the element.
For a container, you can define nested descendants that will appear automatically with the
element in a document. Insert an AutoInsertions element, and for the first child insert
an InsertChild element and type the element tag. Then for each nested descendant,
insert an InsertNestedChild element and type the tag. For more information, see
“Screen modes” on page 183.
For a table, heading, body, footing, or row, you can define element tags that will be used in
row or cell elements in the table or table part. Insert an InitialStructurePattern
element, and then type the tags of the child elements, separated by commas. For more
information, see “Screen modes” on page 184.
7.(Optional) Write attribute definitions to define attributes that can store additional
information about instances of the element.
In FrameMaker, attributes can be used to record information such as the current status of an
element, to maintain IDs and ID references for cross-referencing between elements, and to
allow an element to be formatted using the current value of its attribute.
Insert an AttributeList element. The first Attribute child element is inserted
automatically. Define the first attribute, and then insert and define additional Attribute
elements as necessary. For more information, see Chapter 14, “Screen modes.”
8.(Optional) Write text format rules to describe how to format text in the element or its
descendants.
Text format rules can refer to a paragraph format to use as a “base” format for the element
and can specify context-dependent changes to the format in use. If you write text format rules
for a table, heading, body, footing, or row, the rules specify formatting only for text in
descendant titles and cells.
Insert a TextFormatRules element. Then to specify a paragraph format, insert an
ElementPgfFormatTag element as the first child element of TextFormatRules and
type the format tag. For each set of formatting changes, insert a context element
(AllContextsRule, ContextRule, or LevelRule), specify the context, and define the
changes for the context.
For containers, you can also write text format rules for the first and last paragraphs in the
element, and you can define and format a prefix or suffix to appear at the beginning or end
of the element. Insert FirstParagraphRules, LastParagraphRules, PrefixRules,
or SuffixRules, and define the context and formatting specifications.
For information on the syntax of text format rules and how rules can be inherited from
ancestors, see Chapter 15, “Screen modes,”
9.(Optional) If the element is a table, write an object format rule to define an initial table
format for new instances of the table.
A table format determines the basic appearance of the table—such as indentation and
alignment, margins and shading in cells, and ruling between columns and rows.
Insert an InitialTableFormat element, and insert and define context elements as
necessary. Type the tag of a table format for each context. For more information, see “Screen
modes” on page 243.
Examples
These are definitions for a Rubi group, a Rubi element, and a container for Oyamoji text:
Basic steps
The steps for creating a Rubi Group element and a Rubi element are very much the same as the
steps for defining a container, table, table part, or footnote element. Use the Element Catalog as
a guide for inserting elements in a valid order. Refer to the chapters that follow for detailed
descriptions of the syntax and more examples.
Note that you cannot insert an AutoInsertions element to specify auto insertions for a Rubi
group, but you can insert an InitialStructurePattern element, and then type the tag of
the child Rubi element. For more information, see “Screen modes” on page 187.
Examples
These are definitions for object elements:
Basic steps
This section gives an overview of the steps for defining an object element. Refer to the chapters
that follow for detailed descriptions of the syntax and more examples.
1.Insert an Element element in the highest-level element of the EDD (ElementCatalog)
or in a Section. Then type a tag in the Tag element.
When you insert Element, the Tag child element is inserted automatically. For guidelines on
providing a tag, see “Screen modes” on page 156.
2.(Optional) If you want to include a comment for the definition, insert a Comments element
before Tag and type the comment.
The comment appears just above the definition’s tag line. If you include a comment, place the
insertion point right after Tag when you’re finished.
When you insert one of these elements, the name of the type appears in parentheses before
the tag.
4.(Optional) Write attribute definitions to define attributes that can store additional
information about instances of the element.
In FrameMaker, attributes can be used to record information such as the current status of an
element, to maintain IDs and ID references for cross-referencing between elements, and to
allow an element to be formatted using the current value of its attribute.
Insert an AttributeList element. The first Attribute child element is inserted
automatically. Define the first attribute, and then insert and define additional Attribute
elements as necessary. For more information, see Chapter 14, “Screen modes.”
5.(Optional) Write an object format rule to define a formatting property for new instances
of the element.
These are the properties you can specify in an object format rule:
With the exception of system variable names, these properties are not binding. An end user
can change a marker type, cross-reference format, or other property at any time, and the
change is not considered to be a format rule override. (The user can remove all format rule
overrides when he or she reimports element definitions.) A user cannot change the variable
name for a system variable element.
Unlike text format rules, an object format rule defines the property only for the current
element. Because object elements do not have descendants, the object rule is not passed on
through a hierarchy to other elements.
Insert an InitialObjectFormat or SystemVariableFormatRule element, and
insert and define context elements as necessary. Define a formatting property for each
context. For more information, see Chapter 16, “Screen modes.”
Editing structure
Use these shortcuts for editing the structure of an EDD—for example, inserting, wrapping,
changing, and rearranging elements (Note: for these shortcuts to function, an element must
already be selected).
To Press
Insert an element at the current location Control-1 (one) or Esc Ei
Wrap an element around the current selection Control-2 or Esc Ew
Change the current element Control-3 or Esc Ec
Unwrap the current element Esc Eu
Merge into the first element (when more than one Esc Em
element is selected)
Merge into the last element (when more than one Esc EM
element is selected)
Split the current element Esc Es
Repeat the last insert, wrap, or change element Esc ee
command
Move the element to the next higher level (promote) Esc EP
Move the element to the next lower level (demote) Esc ED
Collapse or expand the current element in the Esc Ex
Structure View
Collapse or expand the element’s siblings in the Esc EX
Structure View
Transpose the current element with the previous one Esc ET
Transpose the current element with the next one Esc Et
definitions until FrameMaker no longer finds errors. Then import the Element Catalog from the
template into a sample document that contains representative text and check to see that the
elements behave in the way you expect. You may need to test the elements in the document,
make revisions in the EDD, reimport the elements into the EDD, reimport the catalog into the
document, and repeat the process as necessary.
Here are a few tasks to go through while testing elements in a sample document:
•Insert and wrap a variety of elements in the document. If you’ve defined any containers to have
child elements added automatically, make sure the child elements also appear when you insert
the containers.
•Move elements around in the document. Check the Structure View to see that the elements are
valid only where they should be.
•Enter attribute values in elements that allow them. Check the Structure View to make sure that
the types of values you want to add are valid according to the attribute’s definition.
•Once you have the format rules in the EDD, move elements around to verify that they are
formatted correctly according to context. Check to see that extra formatting items such as
prefixes and autonumbers appear where they should.
For help on identifying syntax and context errors in an element definition, see:
•“Screen modes” on page 188
•“Screen modes” on page 238
•“Screen modes” on page 250
Once you have both an EDD and a DTD, you can refine the translation in an iterative process of
developing read/write rules. First analyze the EDD and new DTD together to plan how to modify
the translation with rules. Then develop at least some of your rules, update the DTD from the EDD
using the rules, test the results on sample documents, and repeat the process as many times as
necessary. You may find it easiest to write and test only a few rules during each iteration. For a
more detailed discussion of this process, see “Screen modes” on page 115.
You develop read/write rules in a special rules document that is part of a structure application.
When you create a DTD from an EDD, you can specify which application (and hence which set of
rules) to use with the DTD. For information on developing a read/write rules document, see
Chapter 19, “Screen modes.”
Important: When exporting an EDD as a DTD, if the new DTD file has the same name as
the old DTD file, FrameMaker can save a backup version of the old DTD. To use this feature,
you must turn on Automatic Backup on Save in the Preferences dialog box.
SGML declarations
FrameMaker runs a new DTD through an XML or SGML parser. In the process, it may identify errors
in the syntax of the DTD. Two of the most common errors are invalid markup names and an
inappropriate SGML declaration. You can use read/write rules to translate FrameMaker element
tags to valid markup names.
For SGML, if the default SGML declaration that FrameMaker provides is not appropriate for your
DTD, you can modify the declaration to avoid capacity and quantity errors. The default SGML
declaration for FrameMaker uses the reference concrete syntax and the reference quantity set. To
change to a different declaration, insert an SGMLDeclaration element in the application’s
definition in structapps.fm and type the pathname for the new declaration. For a description
of the default SGML declaration and the variations that FrameMaker supports, see Developer
Reference, Chapter 9, SGML Declaration
If you need to reapply the parser to a DTD but not recreate the DTD, select StructureTools > Parse
Structured Document. You must parse an XML or SGML instance that references the DTD
Containers, tables, table parts, footnotes, and Rubi groups can all hold other elements; they build
the structural hierarchy of a document. For each of these elements in an EDD, you need to define
the allowable contents to describe a document structure that is valid.
Content rules are structure rules that describe allowable content in FrameMaker. These rules
translate to content models and declared content in markup. If you convert a DTD to an EDD, or
an EDD to a DTD, the allowed-content information for elements is preserved. You can modify
some of the default translations with read/write rules.
For containers, tables, and some table parts, you can also specify a structure for a new instance of
the element in a document. These rules do not describe the range of allowable contents (as
content rules do), but provide a starting structure as a convenience for your end users.
In this chapter
This chapter explains how to write structure rules in element definitions for containers, tables,
table parts, footnotes, and Rubi groups. It contains these sections.
•Summary of required and optional structure rules:
–“Screen modes” on page 174
•Syntax of content rules and the translation of content rules to markup:
–“Screen modes” on page 175
–“Screen modes” on page 180
–“Screen modes” on page 180
–“Screen modes” on page 182
•Optional rules that specify structure properties for new instances of an element:
–“Screen modes” on page 183
–“Screen modes” on page 184
–“Screen modes” on page 187
•Information to help you correct errors in structure rules:
–“Screen modes” on page 188
Note: XML: The specification for XML does not support inclusions and exclusions. If an
EDD uses inclusions and exclusions, when you save the associated FrameMaker file to XML
the software ignores them. The result could be a document that is valid in FrameMaker,
but invalid in XML. When converting an EDD to a DTD, the resulting XML DTD could
contain errors. You should only use inclusions and exclusions in an EDD that is part of an
SGML structure application.
At least one container in the EDD must also have a rule stating that the container is valid at the
highest level in a structured flow. All other elements in the flow are descendants of this container.
For example:
In a document, if an instance of an element does not conform to the content rules, the Structure
View identifies the problem. If an element is missing one or more child elements required in its
general rule, a small hole marks the first place where elements are missing. If a child element is in
an invalid location according to the general rule and any inclusions or exclusions that apply, the
vertical line next to it is broken to the end of the parent. (The hole and dotted line are in red on
a color monitor.)
An element (Note) is in
an invalid location.
An end user can also validate the document for details on these errors and to find additional errors
such as a highest-level element not permitted at that level. For more information on the Structure
View and validation, see the FrameMaker user’s manual.
Other optional structure rules are available to help you develop a convenient working
environment for end users. For containers, you can define descendants to insert automatically
along with a new instance of the container in a document. And for tables and most table parts,
you can define element tags for child table part elements (in a repeating pattern if necessary).
Symbol Meaning
Plus sign (+) Child element is required and can occur more than once.
Question mark (?) Child element is optional and can occur once.
Asterisk (*) Child element is optional and can occur more than once.
Multiple element tags in a general rule are separated with connectors that specify the order in
which the child elements can occur. These are the connectors available:
Symbol Meaning
Comma (,) Child elements must occur in the order given.
Ampersand (&) Child elements can occur in any order.
Vertical bar (|) Any one of the child elements in the group can occur.
For example, this general rule specifies that the element must begin with a Head, then it must
have one or more Paragraph elements, and then it can have one or more optional Section
elements:
Head, Paragraph+, Section*
This rule specifies that the element can have either one or more Paragraph elements or one
List element:
Paragraph+ | List
Be careful to write general rules that are not ambiguous. When an end user validates a document,
FrameMaker must be able to match child elements to the tags in the general rule without looking
ahead to other child elements. For example, this rule is ambiguous because FrameMaker cannot
tell whether an Item in the document matches the first or second Item in the rule without
looking ahead for a second Item:
Item?, Item
If you want to specify that an element must have one or two Items, write this rule instead:
Item, Item?
The connectors in a group of element tags must all be the same type. For example, this rule is
erroneous because it uses two different connectors:
Caption, Graphic | Table
If you need to mix connectors in an element rule, use parentheses to define groups of element
tags. In the rule above, if you want a Caption followed by either a Graphic or a Table put
parentheses around Graphic | Table. For more information, see “Screen modes” on
page 178.
Content symbols
A general rule can also use symbols that specify content other than child elements. These are the
content symbols available:
Symbol Meaning
<TEXT> Element can contain text.
<TEXTONLY> Element can contain only text. It cannot contain child elements, even
inclusions defined in the content rules of its ancestors.
<ANY> Element can contain any combination of text and elements defined in
the EDD.
<EMPTY> Element cannot contain any text or elements.
You can use the <TEXTONLY>, <ANY>, or <EMPTY> symbol only in a rule by itself, but you can
combine the <TEXT> symbol with element tags for more complex expressions. For example, this
rule specifies that the element can begin with text and can end with a table:
<TEXT>, Table?
Text is always optional and repeatable. An occurrence indicator after a token does not change the
meaning of the general rule: <TEXT>, <TEXT>+, and <TEXT>* are all equivalent.
Use the <TEXTONLY> token for elements that directly correspond to markup elements with
declared content CDATA or (for SGML) RCDATA.
Use the <EMPTY> symbol for elements you want to remain empty. These are some possible
examples of empty container elements:
•A paragraph element that has an autonumber but no content, such as a section number on a
line by itself
•A text range element that has a UniqueID attribute but no content, to describe a source
location within a paragraph for cross-references
•A table cell element that remains empty in tables, such as cells in an empty row to provide space
between groups of cells in a table
For information on translation to XML and SGML, see “Screen modes” on page 182.
Parentheses
You can use parentheses to group element tags and content symbols in a general rule. The items
within a pair of parentheses act as a single tag in the rule’s syntax. You can use occurrence
indicators and connectors with a group as you do with an individual element tag.
For example, this rule specifies that the element must begin with a Head, then it must have at
least one Paragraph or one List element, and then it can have one or more optional
Section elements:
Head, (Paragraph | List)+, Section*
Note that because of the plus sign after the parenthesized group, the Paragraph and List
elements can be repeated any number of times.
A group can also be nested within another group. For example, this rule specifies that the element
must begin with a Front element and then must have either one or more Part elements or one
or more Chapter or ErrorSection elements followed by one or more optional Appendix
elements:
Front, (Part+ | ((Chapter | ErrorSection)+, Appendix*))
The connectors within a single parenthesized group must be the same, although a group nested
within another group can use a different connector.
Make sure that a parenthesized group does not introduce any ambiguities to the general rule. For
example, this rule is ambiguous because either alternative can begin with a Preface element:
Preface | (Copyright?, Preface, Foreward)
Outer parentheses around a general rule are optional. If you save an EDD as a DTD, FrameMaker
inserts outer parentheses when markup requires it.
If you try to save an EDD as a DTD when there are empty general rules, the resulting DTD will have
syntax errors. You need to import the EDD into a template first so that FrameMaker can insert
default general rules for you.
Keep in mind that for an EDD to be valid you need to insert a GeneralRule element in the
definition for every container, table, table part, footnote, or Rubi group—even when you are not
filling in the general rule.
Because inclusions and exclusions apply to an element and its descendants, at some point in the
hierarchy an element may be both included and excluded. When this happens, FrameMaker does
not allow the element to occur. For example, an Index element might be specified as an
inclusion in a Report element. If a Head element excludes Index elements, the Index is
excluded even though Head is a descendant of Report.
Inclusions
To add an inclusion to an element definition, insert an Inclusion element anywhere after the
general rule (or optional validity specification) and before the format rules. Then type the tag of
the element you want to include.
For example, instead of adding IndexMarker to the general rules for Para and Section (and
all the elements they contain), you might specify IndexMarker as an inclusion for Chapter:
Element (Container): Chapter
General rule: Para+, Section*
Valid as highest-level element.
Inclusions: IndexMarker
In the example, an IndexMarker can occur before or after a Para or Section as well as
anywhere within a Para or Section (unless one of the elements specifies IndexMarker as an
exclusion):
When defining an inclusion, look for descendants that should not use the inclusion. Add an
exclusion in the descendants’ definitions to prohibit the inclusion in those contexts.
If you want more than one inclusion, for each additional inclusion, insert an Inclusion element
and type the tag, or put multiple element names in the same element, separated by commas.
An inclusion can use any element tag defined in the current EDD. An end user will be able to insert
the included element only if it is allowed in the context, even though it may be a valid inclusion.
For example, the user cannot insert a table footnote between table rows even though the
footnote may be a valid inclusion in the table because table footnotes are allowed only in titles
and cells.
Exclusions
To add an exclusion to an element definition, insert an Exclusion element anywhere after the
general rule (or optional validity specification) and before the format rules. Then type the tag of
the element you want to exclude.
For example, you might use an exclusion to prevent end users from creating nested Procedure
elements:
Element (Container): Procedure
General rule: Step+
Exclusions: Procedure
The most common uses of exclusions are to prevent nesting and to counter an inclusion for a
particular context.
If you want more than one exclusion, for each additional exclusion, insert an Exclusion element
and type the tag, or put multiple element names in the same element, separated by commas.
FrameMaker can also insert sibling elements automatically. In the Section and Head example
above, since a Section usually begins with a Head and then a Para, you can have both the
Head and Para inserted automatically.
For example, this autoinsertion rule specifies that a new Section begin with a nested Head and
a sibling Para element:
Element (Container): Section
General rule: Head, Para+
Automatic insertions
Automatically insert child: Head
Automatically insert child: Para
You can also have FrameMaker insert a sequence of descendants, in which each nested
descendant has one child element inserted along with it. For example, this autoinsertion rule
specifies that a new List has a nested Item, and the Item has a nested Para:
Element (Container): List
General rule: Item+
Automatic insertions
Automatically insert child: Item
and nested child: Para
This is the structure of the new List:
Keep in mind that the autoinsertion rules from one element definition do not carry over to
another. In the List and Item example above, even though the Item definition in the same
EDD may specify Para as a nested descendant, to insert Para automatically with List you still
need to explicitly specify Para (and Item) in the List definition.
The descendants in autoinsertion rules do not need to be containers. If you use a table, graphic,
cross-reference, variable, marker, footnote, or equation as a nested descendant, that element
should be the last one in the sequence of descendants. The automatic insertion stops after the
non-container element is inserted.
When FrameMaker inserts descendants automatically in a document, it opens dialog boxes as
necessary.
•If a descendant is a table, graphic, cross-reference, variable, marker, or equation and FrameMaker
requires information about the element (such as a table format or a graphic filename), the
appropriate dialog box opens as the element is inserted.
The end user can cancel a dialog box, and the autoinsertion stops at that point. (This does not
affect any descendants that were already inserted automatically.) Be aware of the dialog boxes
that may open during autoinsertion so that you can design a behavior that is reasonable for the
user.
columns in the table. Whenever an end user inserts a structured table, or part of one, FrameMaker
automatically inserts the necessary child elements to build a basic structure.
You can define an initial structure pattern for a table, heading, body, footing, or row, and
FrameMaker will use that structure when an end user inserts the table or table part in a document.
If you do not define a structure pattern, FrameMaker gives new instances of the element a default
initial structure it derives from the general rule.
When an end user inserts a new table element, he or she uses the Insert Table dialog box to
specify the number of heading, body, and footing rows and the number of columns. The initial
structure pattern (or the general rule) determines which row elements to use in the heading, body,
and footing, and which cell elements to use in the columns.
It is also possible that not all of a structure pattern will be used. For example, if an end user inserts
a table with the body defined above and specifies two body rows, the body in the new table has
only a Region row and a State row.
If an end user adds a row to an existing table by inserting a row element, the structure of the new
row is based on the initial structure pattern of the parent heading, body, or footing. (But if the user
adds a row by pressing Control-Return or by using the Add Rows or Columns command, the new
row takes the structure of the row with the insertion point.)
The syntax of an initial structure pattern is restricted as follows:
•The only arguments allowed are element tags. The content symbols <TEXT>, <TEXTONLY>,
<EMPTY>, and <ANY> are not allowed.
•The comma (,) is the only connector allowed. No occurrence indicators are allowed.
•Parentheses are allowed to group element tags.
For more information on the symbols allowed, see “Screen modes” on page 178.
Be sure that the child elements in an initial structure pattern are valid according to the general
rule of the table or table part. Otherwise, a new table may have invalid structure (such as in the
example above with City and Town).
initial structure pattern but has the following general rule, where Normal and Special are two
types of table bodies:
Element (Table): Table
General rule: Title?, Heading, (Normal | Special)
If an end user inserts a table, uses a table format that includes a title, and specifies some heading
and body rows, the new table has an initial structure of Title, Heading, and Normal. (If the
user also gives the table some footing rows, those rows have the default tag Footing.)
For a table heading, body, footing, or row, the default initial structure is simply the first element
tag to appear in the general rule. If the table part needs more child elements, the first child
element is repeated to fill the number of rows and cells required. For example, suppose a body
element does not have an initial structure pattern but has the following general rule, where
Region, State, and City are rows:
Element (TableBody): Body
General rule: Region, State, City
If an end user inserts a table with this body and specifies six body rows in the Insert Table dialog
box, the new table has the following row structure:
Attributes provide a way to store descriptive information with an instance of an element that is
not part of the element’s content. In FrameMaker, you can define attributes for many purposes—
such as to record the current status of an element’s content, to allow cross-referencing between
elements with ID attributes, or to specify how an element is to be formatted. You can define
attributes for any element in FrameMaker.
Attribute definitions in FrameMaker translate to attribute declarations in markup. If you move
documents between FrameMaker and XML or SGML and conform to the markup requirements,
your attributes and their values are usually preserved. FrameMaker provides a default translation
for all of its attribute types, and you can modify the translation by using read/write rules.
In this chapter
This chapter explains how to define attributes in FrameMaker. It contains these sections:
•Background on attributes in FrameMaker documents:
–“Screen modes” on page 189
–“Screen modes” on page 190
•Syntax of attribute definitions:
–“Screen modes” on page 191
•Attributes for special purposes:
–“Screen modes” on page 196
–“Screen modes” on page 200
–“Screen modes” on page 202
•An author attribute in a chapter element can identify the author of the document
(Author=itp).
•A size attribute in a graphic element can specify the width of a frame (ArtWidth=8.5). For
XML you provide a CDATA value, and for SGML you can provide a number value.
Attributes can store source and destination information for elements. These are often used for
cross-referencing between elements. For example:
•An identifier attribute in a head element can uniquely identify the element as a source for cross-
references (ID=Intro).
•A reference attribute in a cross-reference element can store the ID of the source element that is
referred to (Reference=Intro).
You can also use attributes to determine the appearance of an element in a FrameMaker
document. For example:
•A type attribute in a list element can specify whether the list should be numbered or bulleted
(Type=Bulleted).
•A prefix attribute in a note element can provide a text string to display before the element’s
content (Prefix=Important).
FrameMaker also identifies errors involving attributes when the end user validates the document.
For more information on the Structure View and how a user works with attributes, see the
FrameMaker user’s manual.
You can optionally define a range of possible values (for the numeric attribute types) and a default
value (if a value is optional). You can also make any attribute read-only.
To write attribute definitions for an element, insert an AttributeList element. (If the element
is a container, table, table part, or footnote, the attribute list goes after the structure rules.) When
you insert the AttributeList element, the first Attribute child element is inserted
automatically. Define the first attribute, and then insert and define additional Attribute
elements as necessary. The definitions are numbered automatically.
Attribute name
When you insert an Attribute element, the Name child element is inserted automatically along
with it. Type the attribute name in the Name element. For example:
1. Name: Author
Give an attribute a name that is self-explanatory. Although different elements can have attributes
with the same name, it’s good practice to use the same name only for the same semantics.
Attribute names are case-sensitive, and they cannot contain white-space characters or any of
these special characters:
( ) & | , * + ? < > % [ ] = ! ; : { } "
An attribute name can have up to 255 characters in FrameMaker, but you should try to keep the
names concise. End users often display attribute names with their elements in the Structure View.
Note: SGML: If you plan to export documents to SGML, you may want to define attribute
names that conform to the naming rules and the maximum name length permitted by the
concrete syntax you’ll be using in SGML. If you prefer names that do not adhere to the
SGML conventions, you can provide read/write rules to convert them to SGML equivalents
when you export. For more information, see “Screen modes” on page 299.
Attribute type
The attribute type determines what kind of values are allowed in the attribute. You can specify
attribute types for string values, numeric values, and IDs and their references. Insert one of the
type elements after the name in the attribute definition. For example:
1. Name: Author String
These are the attribute types available:
Note: If you make an attribute read-only or hidden, we suggest that you specify the value
to be optional. If a value is required and an instance of the attribute does not have a value,
the document will show a validation error that the end user cannot correct.
Although a read-only or hidden attribute is not editable in the FrameMaker user interface, you can
still edit its value with a structure API client. For information on API clients, see the Structure
Import/Export API Programmer’s Guide.
element if the definition has one). Then type the possible values, separating them with a comma
and a space. For example:
1. Name: Security Choice Required
Choices: Top Security, Classified, Unclassified
The tokens can be strings of up to 255 characters. They can have white-space characters but
cannot have any of these special characters:
( ) & | , * + ? < > % [ ] = ! ; : { } "
If you’re using attribute values to format elements, the order of the values in the list may matter.
When specifying attribute values in format rules, you can use greater-than or less-than operators
to test the location of the current value in the Choices list. For more information, see “Screen
modes” on page 256.
Note: SGML: If you plan to export documents to SGML, you may want to define values
that conform to the naming rules and the maximum name length permitted by the
concrete syntax you’ll be using in SGML. If you prefer values that do not adhere to the
SGML conventions, you can provide read/write rules to convert them to SGML equivalents
when you export. For more information, see “Screen modes” on page 304.
In a document, the values appear in the Attribute Value drop-down list in the Attributes dialog
box when this attribute is selected. An end user chooses from the list to enter one of the values
in the attribute. If the user enters an invalid value through other means (such as pasting),
FrameMaker identifies the attribute as invalid.
Default value
If a value is optional in an attribute, you can specify a default value. FrameMaker can use the
default value for formatting by attributes if an instance of the attribute does not have a value.
Insert a Default element as the last child element in the attribute definition, and then type the
value. For example:
1. Name: ArtWidth Real Optional
Range: From 6 to 11
Default: 8.5
If the attribute is one of the multiple-token types (Strings, Integers, Reals, or
IDReferences), you can specify more than one value token for the default value. For each
additional token, insert a Default element and type the value. When you add a second token,
the Default label in the EDD changes to plural. For example:
1. Name: ArtWidth Real Optional
Range: From 6 to 11
Default: 8.5
11
For information on how FrameMaker can use attribute values in formatting, see “Screen modes”
on page 200. For information on structure API clients, see the Structure Import/Export API
Programmer’s Guide.
This example shows how a FrameMaker element-based cross-reference appears in the Structure
View:
If an end user inserts a cross-reference to a UniqueID that does not yet have a value,
FrameMaker generates an ID value for the UniqueID and the IDReference.
Attributes for cross-referencing can help end users keep track of their references and what they
point to. Because the UniqueID and IDReference attributes on both ends of a cross-reference
store the same value, a user can look at a cross-reference element in the Structure View and see
information about the reference’s source. In addition, if the user knows the UniqueID value of a
source, he or she can find all cross-references to the source by searching for other elements with
that value in their IDReference attribute.
You may also want to make it possible for end users to work with IDReference attributes as
informal pointers to elements with a UniqueID. In this case, the pointers are not FrameMaker
cross-references, so information from the source (such as heading and page number) does not
appear in the document—but the user can still look at the Structure View to see pointers to
related information. For example, suppose you define an IDReference for a Para container
element. To keep track of information from another section in an instance of the Para, a user can
manually enter the section’s ID in the IDReference for Para (using the Attributes dialog box).
He or she can go to the source from the Para later by searching for the element with the ID.
Note: SGML: When importing and exporting between FrameMaker and SGML, the
UniqueID and IDReference attributes are preserved. UniqueID attributes in
FrameMaker translate to ID attributes in SGML, and IDReference attributes translate to
IDREF attributes. For more information, see Chapter 25, “Screen modes.”
UniqueID attributes
You can assign a UniqueID attribute to any element in FrameMaker. If you plan to use the
element as a source for cross-references, the element will likely be a chapter, section, table, or
figure. An element can have only one UniqueID attribute.
In the attribute definition, insert a UniqueID element after the name. For example:
Element (Container): Section
General rule: <TEXT>
Attribute list
1. Name: ID UniqueID Optional Read-only
The value in an instance of a UniqueID attribute must be unique for this attribute type in a
document or book. Even if a document has two different elements (such as Section and
Chapter) that have a UniqueID attribute, you cannot have any duplication of ID values.
It is possible for a document to end up with IDs that are not unique—for example, if the end user
shows hidden text that contains an element with a conflicting ID, or if you change an attribute
type to UniqueID and instances of the attribute already have duplicate values. FrameMaker
identifies duplicate IDs as invalid.
An end user can provide ID values, or FrameMaker can generate the values. Each method has its
advantages:
•If a user provides the IDs, he or she can use values that are meaningful (whereas an ID that
FrameMaker generates is a random string). This can make it much easier to remember IDs and
to recognize them in the Cross-Reference dialog box and the Structure View.
•If FrameMaker generates the IDs, the IDs are virtually guaranteed to be unique within a
document or book, and they will remain unique because a user cannot edit them. The IDs that
FrameMaker generates also conform to the SGML reference concrete syntax.
Although UniqueID attributes are often used in sources for cross-references, an element with
this attribute is not required to have a reference to it.
accepts the value if it is unique, but warns the user about possible unresolved references. The user
can check for unresolved cross-references by searching for an element with an IDReference
attribute value equal to that of the replaced ID.
Note: SGML: If you plan to export documents to SGML, the SGML naming rules will
likely allow fewer characters—and different characters—for attribute values. Refer to the
concrete syntax you’ll be using in SGML for the maximum name length and the characters
allowed. To ensure that your end users conform to the concrete syntax, you may want to
prepare recommendations on entering values. Remind users to begin IDs with a name-
start character and to use only name characters thereafter.
IDReference attributes
You can assign an IDReference or IDReferences attribute to any element in FrameMaker. If
you plan to use the element as a FrameMaker cross-reference, the element should be a cross-
reference object element.
In the attribute definition, insert an IDReference or IDReferences element after the Name
element. For example:
Element (CrossReference): XRef
Attribute list
1. Name: Reference IDReference Required
In a document, when an end user inserts a cross-reference element with an IDReference and
points the reference to an element with a UniqueID, FrameMaker automatically fills in the
IDReference with the value from the source’s UniqueID.
FrameMaker also allows an end user to point a cross-reference element to a paragraph source
rather than to an element source. In this case, the value of the IDReference remains
unspecified.
If you want to require end users to base all cross-references on elements rather than on
paragraphs, provide an IDReference attribute for every cross-reference element, and make the
attribute required. If a cross-reference points to a paragraph, its IDReference attribute does not
have a value, and FrameMaker identifies the attribute as invalid.
Note: SGML: For element-based cross-referencing in FrameMaker, you use the singular
IDReference attribute, and one value is stored to describe the location of the source.
Some SGML applications may require the IDReferences list attribute to store multiple
values that build composite source information. Use IDReferences if you plan to share
documents with one of these applications.
If you export an IDReferences list attribute to SGML, multiple-value source data for the
attribute is preserved. If you import a multiple-value source from SGML, FrameMaker
preserves the source data but uses only the first value.
You can define more than one IDReference attribute for an element. For example, you may
want to do this to allow end users to work with the attributes as informal pointers to several
sources. For a discussion of pointers that are not FrameMaker cross-references, see page 197.
It is possible for a document to end up with an IDReference value that does not match a
UniqueID value in the document or book (usually because the end user has pasted the
IDReference value or deleted the UniqueID value). FrameMaker identifies the
IDReference as invalid.
You can refer to attribute values in object format rules as well as in text format rules. In this
example, a Table uses Format A if its Type attribute has the value Summary or it uses
Format B if its Type attribute has the value Examples:
FrameMaker can use the default value of an attribute to determine context. In the Table example
above, if Type is not specified for a table in a document, the table’s initial format will be Format
A (the format for the default value Summary).
Note that in both the Item and the Table examples, you could use Else rather than ElseIf
to describe the second context. In the Item definition Numbered is the only other possible value
for the Type attribute from List, and in the Table definition Examples is the only other
possible value. When you use the Else specification, the label in the definition is simply Else
and you do not specify a context such as Type="Numbered".
You can test the values of multiple attributes by joining the specifications with an ampersand (&).
For example, this specification is true if the element has a Type attribute with the value
Numbered and a Content attribute with the value Procedure:
List [Type = "Numbered" & Content = "Procedure"]
In addition to testing for equality with attribute values, you can also use != to test for inequality
(with all attribute types) or a greater-than sign (>) or less-than sign (<) to test for comparison (with
the Choice and numeric types).
If you use a greater-than sign or a less-than sign with a Choice attribute in a format rule,
FrameMaker evaluates the name/value pair using the order in the list of values in the attribute’s
definition, with the “lowest value” being the one on the left. For example, this pair specifies any
Security value that is to the left of Classified in the defined Choices list for the
Security attribute:
Report [Security < "Classified"]
For more detailed information on attribute name/value pairs in context specifications, and the
operators you can use with them, see “Screen modes” on page 256.
A reference to an attribute value can also include element tags. In this case, FrameMaker uses the
value for the named attribute in the closest containing element with the specified tag. For
example, this definition displays the value of the Label attribute in the closest containing List
or Section that has the attribute:
Prefix: <attribute[Label: List, Section]>
If you list element tags and want to search in the current element, you need to include that
element in the list of tags.
For more detailed information on attribute names in prefix and suffix definitions, see “Screen
modes” on page 233.
You can define text formatting properties for containers, tables, table parts, and footnotes in
FrameMaker. When an end user inserts one of these elements in a document, text in the element
or in a descendant is formatted automatically according to the format rules in the EDD.
Text formatting in FrameMaker is hierarchical—an element can inherit its properties from
ancestors and pass on its properties to descendants.
XML uses CSS and XSL to express formatting of a document apart from the markup data. When
reading XML, FrameMaker does not use the CSS data or any of the formatting expressed in XSL.
Instead, FrameMaker uses the template associated with the XML structure application to format
the data. When writing XML, FrameMaker can generate a CSS file based on the formatting in the
document template. You can also use the StructureTools > Generate CSS2... command to
generate a CSS.
The formatting information in the template includes format definitions as well as format rules
specified in the EDD. You specify whether or not to generate the CSS in the structapps.fm file.
For more information, see and Chapter 20, “Screen modes.”
Markup does not provide a mechanism for formatting text, so the text format rules you write in
FrameMaker do not have counterparts in markup. If you import a DTD, you can add format rules
to the resulting EDD for use in FrameMaker. If you import a markup document, the text in the
document is formatted for elements that have format rules in the EDD you use. If you export a
document or EDD to markup, the text formatting information is not preserved.
In this chapter
This chapter explains how to write text format rules for containers, tables and their parts, and
footnotes in FrameMaker. It contains these sections.
•Background on text format rules and inheritance:
–“Screen modes” on page 206
–“Screen modes” on page 207
•Syntax of text format rules:
–“Screen modes” on page 212
–“Screen modes” on page 212
–“Screen modes” on page 213
–“Screen modes” on page 216
By using context-dependent format rules, you don’t need to define and maintain a separate
paragraph format for each place in which an element can occur.
Any part of an element’s formatting information can be inherited from an ancestor’s definition. For
example, you might want to indent a Section element and its descendants when it is nested
within another Section. You could specify the change in indentation once, in a format rule for
Section, and the descendants of Section would inherit this information:
To write text format rules that are easy to maintain, you should normally define as little formatting
information as possible in each element definition and let the elements inherit whatever
properties they share with their ancestors. Using inheritance judiciously can greatly simplify your
format rules.
The only table-part elements that can contain text are table titles and cells. Although you can
write format rules for table, heading, body, footing, and row elements, in these cases the rules
specify text formatting only for their descendant titles and cells.
In a document, if an end user applies a different paragraph format to an element or applies
formatting changes to an element, the changes are considered format rule overrides. When the
user re-imports element definitions, he or she can either leave the overrides as they are or remove
the overrides so that the formatting in elements with text conforms to the text format rules.
•If the element’s definition does not specify a paragraph format, FrameMaker searches up
through the element’s ancestors until it finds an element with a format and then uses that
format.
In general, if FrameMaker reaches the top of the element’s hierarchy and still has not found a
format, it uses the default Body paragraph format for the document. (The behavior is
somewhat different for an element in a table or footnote, or if the document is part of a book.
See “Screen modes” on page 210 or “Screen modes” on page 211.)
After FrameMaker takes a paragraph format from an ancestor or from the top of the hierarchy, it
starts at that point and goes back down through the hierarchy to the current element, picking up
formatting changes in format rules along the way. The changes modify the paragraph format
cumulatively at each point. A format can have an absolute value (a fixed value, such as an indent
expressed as distance from the left margin) or a relative value (a change to a current setting, such
as an amount to move an indent). An absolute value replaces the same value in the paragraph
format, and a relative value is added to the format’s value to create a new value.
For example, in this set of definitions only the Section element has a base paragraph format
(body). The descendants of Section all use the body paragraph format, and most also specify
changes to it:
When no paragraph format is specified, the default format Body is used. Note that because case
is significant in format tags, body in the example is not the same as the tag Body.
The following document structure uses these definitions. FrameMaker formats text in the Item
elements by searching up to the second-level Section for a paragraph format. The Item
elements are left-indented 0.5 inch more by the format rule for the second-level Section and
another 0.5 inch by the List element’s format rule. They also have a bullet provided by an
autonumber in their own definition.
Section
format: body Each Item gets its paragraph
format from Section and picks
up an inch of indentation from
Section and List.
Section
format: body
left indent= +.5"
Head List
weight=bold left indent=+.5"
size=14pt
Item Item
autonum=\b\t autonum=\b\t
Note that when FrameMaker picks up changes from ancestors, it includes changes from the
element with the paragraph format.
Book
Chapter
Document
Section
Head
Only a document’s main flow is considered to be part of a book’s hierarchy. FrameMaker continues
the search up into the book file if the current element is part of the main flow.
When an end user updates a book, the element hierarchy from the book file is stored in the book’s
documents. To apply a paragraph format, FrameMaker looks at the book’s hierarchy in the
document and then uses the appropriate format from the document’s format rules. Closing or
even deleting the book file does not affect the book information in a document; a user can
regenerate the book without the document to remove the information.
If the end user adds a document to the book, the book’s text format rules are not automatically
applied to elements in the document. The user needs to update the book again.
Usually, paragraph formats do not vary greatly from one element to another. Your definitions will
be simpler and the catalogs easier to maintain if you specify paragraph formats for as few
elements as necessary and let most elements inherit their format. You can use format rules to
handle changes to the format for particular elements. For information on inheritance, see “Screen
modes” on page 207.
Table, heading, body, footing, and row elements cannot contain text themselves, but can hold
other elements that do. If you specify a paragraph format for one of these elements, the format
applies only to the element’s descendants that can contain text.
A paragraph format can also be part of a context-dependent format rule so that it is used only in
some cases. This is described in “Screen modes,” next.
•The rule can apply to all contexts in which the element occurs, or it can define particular
contexts or the number of levels deep the element is nested in an ancestor. If the rule defines
contexts or levels, it can have separate if, else/if, and else clauses for different possibilities.
•Each “in all contexts” rule or if, else/if, and else clause specifies formatting changes. The
formatting changes can be a list of specific properties; or a reference to a different paragraph
format, a character format (if you are formatting the element as a text range), or a list of
properties stored elsewhere in the EDD.
For example:
A format rule or clause can also include a context label to help end users select elements when
inserting cross-references or preparing a table of contents or other generated list. An element can
have more than one format rule, and format rules can be nested inside one another. The format
rules are numbered automatically.
Chapter 17, “Screen modes.” describes the context specifications and context labels in format
rules. For a summary of the formatting changes available, see “Screen modes” on page 213.
An element’s format rules or paragraph format can also be inherited from an ancestor. For
information on this, see “Screen modes” on page 207.
Paragraph formatting
You can define paragraph-formatting changes for any container, footnote, table, or table part.
Insert a ParagraphFormatting element after the context specification, and then specify one
of these changes:
•Refer to a paragraph format stored in the document. A paragraph format is a fully specified set
of properties—including font settings, indentation, line spacing, alignment, and
autonumbering. The format replaces the paragraph format for this context only. (It does not
become the base format for the element and is not inherited by descendants.)
Insert the element ParagraphFormatTag, and type the tag of the paragraph format.
•Make changes to particular paragraph format properties. The changes modify the specified
properties in the paragraph format in use.
Insert the element corresponding to the group of properties (such as PropertiesFont), and
define the changes. For a summary of these properties, see “Screen modes” on page 216.
•Refer to a list of changes to properties stored elsewhere in the EDD. The changes in the list
modify the specified properties in the paragraph format in use.
Insert the element FormatChangeListTag, and type the tag of the change list. For
information on defining a list, see “Screen modes” on page 235.
For example:
•Make changes to particular font properties. The changes modify the specified font properties in
the paragraph format in use.
Insert the PropertiesFont element, and define the changes. For information on the
properties, see “Screen modes” on page 220.
•Refer to a list of changes to properties stored elsewhere in the EDD. The changes in the list
modify the specified font properties in the paragraph format in use.
Insert the element FormatChangeListTag, and type the tag of the change list. For
information on defining a list, see “Screen modes” on page 235.
For example:
If you use a format change list with a text range, only the font properties from the list are applied.
No additional formatting
You can also specify no formatting changes, and the element in that context will be formatted
according to the current paragraph format (which may have been inherited and modified by
ancestors’ format rules). Insert a NoAdditionalFormatting element after the context
specification.
The no-formatting option provides a way to express “if not” in a multiple-clause format rule. For
example, this rule specifies that if a Head does not appear in a LabeledPar or Sidebar
element, the formatting changes are made as described:
In some cases, you may also want to use the no-formatting option to improve the readability of a
format rule. In the nested rule (1.1) in the example above, you could leave out the If level
is: 1 clause and begin with If level is: 2. But the level-1 information makes the rule
more comprehensive and will remind anyone reading the rule later that the paragraph format in
use is correct for Head elements in a first-level Section.
With some properties you type the value, and with others you use a keyword child element (such
as Bold or Yes) to express the value. Most of the numeric values you can enter are absolute, but
a few values in the Basic, Font, and Table Cell groups are relative. A relative value can be positive
or negative. (The plus sign is not required with a positive value.) You cannot enter both an
absolute value and a relative value for a property.
An absolute value overrides the current value for the property in the paragraph format in use. A
relative value is added to the current value to set a new value. For example, suppose an element
inherits a paragraph format with a left indent of .25 inch:
•With a LeftIndent value of 1 inch, the new left indent is 1 inch.
•With a LeftIndentChange value of 1 inch, the new left indent is 1.25 inch.
You can specify a unit of measure, such as pt or in, for indentation and tab stops in the Basic
properties and the frame position in the Advanced properties; if you do not specify a unit,
FrameMaker uses the one set in View Options in the document. Offsets and spreads in Font
properties and word spacing in Advanced properties are always in percentages. For any other
numeric value, if you specify a unit it is converted to points.
These are the possible units of measure:
Properties that can use relative values have minimum and maximum limits. Font sizes, for
example, must fall within the inclusive range 2 to 400 points. If you set a value that is outside an
allowed range (either by specifying an absolute value or by calculating a new relative value),
FrameMaker changes the value to the minimum or maximum. You can also set your own
minimum and maximum limits. For a summary of the minimum and maximum limits and
information on changing them, see “Screen modes” on page 236.
For more details on the formatting properties and guidelines on how to use them, see the
FrameMaker user’s manual.
Basic properties
The Basic properties set indentation, line spacing, paragraph alignment, paragraph spacing, and
tab stops. To begin changing these properties, insert a PropertiesBasic element in the
ParagraphFormatting element.
The numeric settings for Basic properties all allow an absolute value or a relative value. Use the
elements with Change in the tag for relative values.
Indents Distances from the left and right edges of the text column to the
text.
FirstIndent dimension Sets the left indent for the first line
in a paragraph. Type the distance from the left edge of the text
column.
FirstIndentRelative dimension Sets the left indent for
the first line in a paragraph (relative to the left indent in use). Type a
relative value.
FirstIndentChange dimension Sets the left indent for the
first line in a paragraph (added to the current first indent). Type a
relative value.
LeftIndent dimension Sets the left indent for all lines in a
paragraph after the first line. Type the distance from the left edge of
the text column.
LeftIndentChange dimension Sets the left indent for all
lines in a paragraph after the first line (added to the current left
indent). Type a relative value.
RightIndent dimension Sets the right indent for all lines in
a paragraph. Type the distance from the right edge of the text
column.
RightIndentChange dimension Sets the right indent for all
lines in a paragraph (added to the current right indent). Type a
relative value.
LineSpacing Vertical space between lines in a paragraph, measured from
baseline to baseline. (See the note on font size and line spacing after
this table.)
Height dimension Sets the space between lines in a
paragraph. Type the distance from one baseline to the next.
HeightChange dimension Sets the space between lines in a
paragraph (added to the current line spacing). Type a relative value.
Fixed Keeps line spacing the same everywhere in a paragraph.
Tab stops
To set tab stops for an element, insert a TabStops element in PropertiesBasic and then
continue with the following elements and values. A single format rule clause can have one or
more TabStop elements or one MoveAllTabStopsBy element or one ClearAllTabStops
element.
Font properties
The Font properties set the font, size, and style of text in an element. To begin changing these
properties, insert a PropertiesFont element in the ParagraphFormatting or
TextRangeFormatting element. In a ParagraphFormatting element, the label you see in
the EDD is Default font properties; in TextRangeFormatting, the label is Font
properties.
Most of the Font properties use a child element to set the value, and in many cases FrameMaker
inserts a default child element for you. You can select the child element and change it to a
different one if you need to.
The following elements and values define the Font properties:
Angle keyword Sets a font angle (such as italic or cursive). Insert a keyword child
element to specify the angle.
Case keyword Sets a capitalization style (such as lowercase or small caps). Insert a
keyword child element to specify the case.
ChangeBars If Yes, displays a vertical line in the page margin where an end user
boolean has made changes to text.
Color name Specifies a color for text. Type the name of a color defined in Color
Definitions in the document.
CombinedFont name Specifies a combined font. Type the name of the combined font that
is available to your users. Note that the combined font must be
defined in the FrameMaker document that will use this EDD.
Family name Specifies a typeface family (such as Times or Helvetica). Type the
name of a font that is available to your end users.
OffsetHorizontal Moves a text range element. Type the percentage of an em space
real-number you want the element to move. (FrameMaker interprets a value of 20
as 20% of an em space.) A positive value moves the element right; a
negative value moves it left.
OffsetVertical Moves a text range element. Type the percentage of an em space
real-number you want the element to move. (FrameMaker interrupts a value of
20 as 20% of an em space.) A positive value moves the element up;
a negative value moves it down.
Overline boolean If Yes, places a line over text.
PairKerning If Yes, turns on ligatures and moves character pairs closer together
boolean as necessary to improve appearance. The ligatures, character pairs,
and amount of kerning depend on the font.
Size dimension Sets a point size for text. Type a number of points from 2 to 400. (The
notation pt or point is optional.) (See the note on font size and
line on page 219.)
SizeChange Sets a point size for text (added to the current point size). Type a
real-number relative value in points. (The notation pt or point is optional.) (See
the note on font size and line on page 219.)
Spread Renamed to Tracking (see below). Spread will still work, for
real-number backward compatibility.
SpreadChange Renamed to TrackingChange (see below). SpreadChange will
real-number still work, for backward compatibility.
Stretch Sets the amount to stretch or compress the characters. Type a
real-number percentage of the font’s em space. (The symbol % is optional.) A
positive value stretches the characters; a negative value compresses
them. Normal stretch is 0 percent.
StretchChange Sets the amount to stretch or compress the characters (added to the
real-number current stretch). Type a relative value as a percentage of the font’s
em space. (The symbol % is optional.)
Strikethrough If Yes, places a line through text.
boolean
Superscript Changes characters to a script above or below the baseline. Insert a
Subscript keyword keyword child element to specify superscript or subscript. The text
size and the amount of offset are determined by Text Options in the
document.
Tracking Sets the space between characters. Type a percentage of the font’s
real-number em space. (The symbol % is optional.) A positive value increases the
spread; a negative value decreases the spread. Normal spread is 0
percent.
TrackingChange Sets the space between characters (added to the current tracking).
real-number Type a relative value as a percentage of the font’s em space. (The
symbol % is optional.)
Underline keyword Sets an underline style (such as double underline or numeric
underline). Insert a keyword child element to specify the style.
Variation keyword Sets a font variation (such as compressed or expanded). Insert a
keyword child element to specify the variation.
Weight keyword Sets a font weight (such as bold or black). Insert a keyword child
element to specify the weight.
Background-color Sets the background color for the paragraph text. Type the
background color for the paragraph text.
Pagination properties
The Pagination properties affect the placement of a paragraph on a page and determine how to
break the paragraph across columns and pages. To begin changing these properties, insert a
PropertiesPagination element in the ParagraphFormatting element.
The following elements and values define the Pagination properties:
KeepWithNext If Yes, keeps a paragraph in the same text column as the next
boolean paragraph.
KeepWithPrevious If Yes, keeps a paragraph in the same text column as the previous
boolean paragraph.
Placement Placement of a paragraph on a page.
AcrossAllCols Makes a paragraph straddle the width of all
columns in its text frame.
AcrossColsSideHeads Makes a paragraph straddle the width
of the columns and the side-head area.
InColumn Keeps a paragraph in its text column so that it does
not straddle other columns.
RunInHead Displays a paragraph as a head that runs into the
next paragraph. A run-in head can have default punctuation.
SideHead Displays a paragraph as a side head across from the
next paragraph. A side head can have default punctuation.
DefaultPunctuation string For a run-in head or a side
head, specifies punctuation to appear after the head. Type one or
more characters (can be any characters including spaces).
Alignment keyword For a side head, aligns the baseline of the
head with the first baseline, top baseline, or top edge of the
paragraph across from it. Insert a keyword child element to specify
the type of alignment.
Numbering properties
The Numbering properties specify the syntax and format for an automatically generated string,
such as a number that appears at the beginning of a procedure step. To begin changing these
properties, insert a PropertiesNumbering element in the ParagraphFormatting
element. (An autonumber can also be a fixed text string, such as the word Note at the beginning
of a paragraph.)
If a paragraph element with an autonumber also has a prefix or suffix, the prefix appears just after
the autonumber at the beginning of the paragraph, and the suffix appears just before the
autonumber at the end of the paragraph.
To read about the syntax of autonumbers and the building blocks available, see the FrameMaker
user’s manual.
The following elements and values define the Numbering properties:
Advanced properties
The Advanced properties set hyphenation and word spacing options and determine whether to
display a graphic with a paragraph. To begin changing these properties, insert a
PropertiesAdvanced element in the ParagraphFormatting element.
The following elements and values define the Advanced properties:
FrameAbove name Displays a graphic from a reference frame above a paragraph. Type
the name of a frame stored on a reference page in the document.
You can also set a position for the frame.
FrameBelow name Displays a graphic from a reference frame below a paragraph. Type
the name of a frame stored on a reference page in the document.
You can also set a position for the frame.
FramePosition Specifies whether the left alignment of the frame above or the frame
boolean below matches the text column or the paragraph indent. Yes
specifies that it matches the paragraph indent.
Hyphenation Hyphenation properties for all text in an element.
Hyphenate boolean if Yes, turns on automatic hyphenation
for the element.
Language string specifies the language to use for hyphenation
rules.
MaxAdjacent integer Sets the maximum number of
consecutive lines that can end with a hyphen. Type a value.
ShortestPrefix integer Sets the minimum number of
letters in a word that can precede a hyphen. Type a value.
ShortestSuffix integer Sets the minimum number of
letters in a word that can follow a hyphen. Type a value.
ShortestWord integer Sets the minimum length of a
hyphenated word. Type a value.
WordSpacing The amount or word spacing that FrameMaker can decrease or
increase in an element. These settings are percentages of the
standard word spacing for the font. Normal spacing is 100 percent.
Values below 100 allow tighter spacing; values above 100 allow
looser spacing.
LetterSpacing boolean If Yes, allows additional space
between characters in justified text to keep the space between
words from going over the maximum.
Maximum integer Sets the largest space allowed between
words before FrameMaker hyphenates words or adds letter spacing
in justified paragraphs. Type a percentage of the font’s em space.
(The symbol % is optional.)
CellMargins Margins between the borders of a cell and the text in the cell.
Bottom, Left, Right, or Top Specifies the margin to change.
For each margin, you can set a custom value or a value that is
relative to the table format’s margin.
Custom dimension Type the distance in points from
the border of the cell to the text. (The notation pt or point
is optional.)
FromTblFormatPlus dimension Type a relative
value in points that is added to the default margin set in the
table format. (The notation pt or point is optional.)
VerticalAlignment Sets top, middle, or bottom alignment for text in a table cell. Insert a
keyword keyword child element from the catalog to specify the type of
alignment.
The following elements and values define the Asian text spacing properties:
Direction properties
The elements in a structured document are directional. This implies that the content in an element
can authored and read left-to-right (for languages such as English, German, or French) or right-to-
left (for Arabic or Hebrew). To enable directional support in structured applications, the dir EDD
construct is included in the ParagraphDirection to specify the direction of the element.
You can use the dir property to define the following directions:
In this example, the Paragraph definition specifies that the dir property provides three choices:
ltr, rtl, inherit.
Note that if the first and last paragraphs are child elements, you can get the same first and last
formatting using {first} and {last} sibling indicators in format rules for the child elements.
The first and last format rules are more natural with the hierarchical model, however. Because the
properties are associated with the parent, they are inherited by any paragraph that happens to be
the first or last child—so you need to define the special formatting only once. (In the List
example above, with {first} and {last} indicators, you would need to define the lines for
both the Head and the Item child elements.)
There are some similarities between the uses of first and last format rules, autonumber strings, and
prefixes and suffixes. For guidelines on using the different constructs, see “Screen modes” on
page 234.
If an element contains a single paragraph, and the first and last rules both specify an autonumber,
only the first rule is used.
A first or last rule can also apply to a prefix or suffix that is formatted in a paragraph of its own.
Because the formatting part of prefix and suffix rules allows only specification of font changes, you
can use a first or last rule to give the prefix or suffix special paragraph formatting properties. For
an example of this, see “Screen modes” on page 231.
You can display a prefix or suffix with element text in a cross-reference or in a running header or
footer in a document. Use the $elemtext (rather than the $elemtextonly) building block in
the cross-reference format or in the header or footer definition. For more information, see the
FrameMaker user’s manual.
There are some similarities between the uses of first and last format rules, autonumber strings, and
prefixes and suffixes. For guidelines on when to use the different constructs, see “Screen modes”
on page 234.
Important: Font changes for a prefix/suffix do not take effect if the prefix/suffix begins
with a forced return.
When FrameMaker formats an element with a prefix or suffix, it applies format rules in this order:
•The element’s text format rules
•The element’s first or last format rules
•The element’s prefix or suffix format rules
If the element has first or last rules and the prefix or suffix is formatted in a paragraph of its own,
the prefix or suffix is the first or last paragraph for the purposes of formatting. Because of the order
that rules are applied, a prefix or suffix format rule can override font changes in a first or last
format rule.
In this example, the prefix and suffix do not have any font changes, so they are formatted the
same as other text in the Quotation element.
If you want fixed text to appear at the beginning or end of a paragraph rather than inside the
paragraph, define the string as a prefix, suffix, or autonumber for the paragraph element. For
information on autonumbers, see “Screen modes” on page 223.
If a paragraph element also has an autonumber, the prefix appears after an autonumber at the
beginning of the paragraph, and a suffix appears before an autonumber at the end of the
paragraph.
For example, suppose you want FrameMaker to display heads automatically for syntax
descriptions that can have several paragraphs. If you have a Syntax element that is a parent for
the paragraphs in a description, you can set up a prefix that provides a head appropriate for the
context of Syntax:
In each description, the boldfaced string Synopsis and contents, Arguments, or Examples appears in
a paragraph by itself above the first child Para.
Note that in a prefix or suffix rule you can specify formatting changes only to font properties. If
you are displaying a prefix or suffix in a paragraph by itself and want to apply paragraph changes
to it such as space above or below, give the parent element a first format rule (for a prefix) or a
last format rule (for a suffix). The prefix is the first paragraph in the parent, or the suffix is the last
paragraph in the parent. In the Syntax example above, the first format rule puts 4 points of space
below the prefix head.
The prefix string in the example has a space at the beginning and the suffix string has a space at
the end, so that within a paragraph the annotation will have extra space on each side.
Note that FrameMaker first applies the text format rules to the entire element and then applies
the prefix and suffix rules. In the example above, the prefix and suffix strings are in bold italics
because they get their angle property (italics) from the text format rules.
If you do not include an element tag, FrameMaker uses the value for the named attribute in the
current instance of the element. For example, this definition displays the value of the Security
attribute in the current element:
Prefix: <$attribute[Security]>
If you do include element tags, FrameMaker uses the value for the named attribute in the closest
containing element with a tag that matches elemtag and an attribute that matches attrname. For
example, this definition displays the value of the Security attribute in the closest containing
Item or LabelPara that has the attribute:
Prefix: <$attribute[Security: Item, LabelPara]>
The element specification can include a context label in parentheses. FrameMaker finds the
closest containing element with a tag that matches elemtag and the specified context label. For
example, this definition displays the value of the Security attribute from the closest containing
Head element that has a Chapter Level context label and a Security attribute:
Prefix: <$attribute[Security: Head(Chapter Level)]>
If you use empty parentheses or the token <nolabel> in parentheses, FrameMaker finds only
elements without a context label. For example, the specification Head() or Head(<nolabel>)
finds Head elements with no label.
•To display a text string in the middle of an element formatted as a paragraph without breaking
the paragraph, define the text as a prefix or suffix for a text range child element. (For example,
you might put quotation marks around a quotation text range, or separate fields in a
bibliography entry with appropriate punctuation and spaces.)
•To display a text string in a paragraph of its own at the beginning or end of a parent element
that is only a container for paragraph elements, define the text as a prefix or suffix for the
parent. (For example, you might put a head at the top of a section.)
You can specify font changes for the string in the prefix or suffix rules. If you want to apply
paragraph-formatting changes to the string’s paragraph, define the changes in a first or last
format rule for the parent.
For more information, see:
•“Screen modes” on page 223 (for autonumber strings)
•“Screen modes” on page 227
•“Screen modes” on page 229
You can refer to the format change list by name in text format rules, in first or last format rules, or
in prefix or suffix rules for an element that is formatted as a paragraph or text range. For
information on referring to a list, see “Screen modes” on page 213.
When you refer to a format change list in an element definition, only the changes that are
appropriate for the current element apply. For example, the following list defines changes for code
segments that can be formatted as either paragraphs or text ranges. If you refer to the list from a
rule clause that formats the code as a text range, the font properties from the list apply but the
basic properties do not:
Only the properties that are used from a change list are passed on to descendants.
When an end user imports element definitions, FrameMaker generates a Format Change List
Catalog in the document from named change lists in the EDD. Each time the user re-imports
definitions, a new catalog overwrites the existing one in the document. Importing formats does
not affect the catalog. If the user removes the structure from a document, the Format Change List
Catalog is also removed.
Some properties in format change lists have minimum and maximum limits. Font sizes, for
example, must fall within the inclusive range 2 to 400 points. If you set a value that is outside an
allowed range (either by specifying an absolute value or by calculating a new relative value),
FrameMaker changes the value to the minimum or maximum. With some values, you can also set
your own limits. See “Screen modes,” next.
You can set minimum and maximum limits on any properties that can use relative values in text
format rules and change lists. A limit you set also applies if you specify an absolute value for the
property.
To set minimum and maximum limits on properties, insert a FormatChangeListLimits
element as the last child element in ElementCatalog. For each limit you want to set, insert an
element for a set of limits (such as LeftIndentLimits) and then insert at least a Minimum or
Maximum child element and type the limiting value. For example:
If a relative value in the EDD causes a property’s value to be calculated beyond the limit you set,
or if you enter an absolute value that is beyond the limit, the value is set to the specified minimum
or maximum. For example, if you set a minimum font size of 6 points and an element’s font is
recalculated to 4 points, the font changes only to 6 points in the element.
Properties that can use relative values have a minimum and maximum limit already built in. You
can further limit a built-in range, but you cannot extend it. These are the limits you can define and
their built-in minimum and maximum values:
The minimum and maximum limits are global and apply to a value wherever it occurs in the EDD.
You cannot set limits for a value in a particular format rule or change list.
For a summary of the properties available in format rules and format change lists, see “Screen
modes” on page 216.
The scroll box on the right can show text format rules, first and last format rules, and prefix and
suffix rules. If the selected element is an object, such as a table or cross-reference, the list shows
object format rules instead. For an example of this dialog box with object rules, see “Screen
modes” on page 250.
To display the formatting properties for a paragraph format or character format, select the format
in the list on the right and click Display Designer.
A FrameMaker document uses special elements for tables, graphics, markers, cross-references,
equations, and system variables. Each of these objects can have a formatting property in a
document, such as a table format or an equation size. You can define this property in an object
format rule for the element, and the format is applied automatically when an end user inserts an
instance of the element in a document.
FrameMaker object format rules have no direct counterparts in markup. If you import a DTD, you
can add format rules to the resulting EDD for the objects you plan to use in FrameMaker. If you
import a markup document with a CALS table element that has a single tgroup element, and
if the EDD in use has a definition for an element named Table, any table format specified in the
EDD’s Table definition is applied to the imported table.
If you export a document or EDD to XML or SGML, the object formatting information is not
preserved. However, if you export to XML the software can generate a CSS file that captures the
overall formatting of your FrameMaker document. This includes the paragraph formats used in
table cells, for example. You specify whether or not to generate the CSS in the structapps.fm
file. For more information, see Developer Reference, page 24: Managing CSS import/export and
XSL transformation.
In this chapter
This chapter explains how to write object format rules for tables, graphics, markers, cross-
references, equations, and system variables in FrameMaker. It contains these sections.
•Background on object format rules:
–“Screen modes” on page 242
–“Screen modes” on page 243
•Syntax and uses for object format rules:
–“Screen modes” on page 243
–“Screen modes” on page 244
–“Screen modes” on page 246
–“Screen modes” on page 247
–“Screen modes” on page 248
–“Screen modes” on page 248
“Screen modes” on page 249
•Information to help you correct errors in format rules:
These are the formatting properties you can define for FrameMaker objects:
•A table format for a new table element. The format determines properties such as indentation
and alignment, margins and shading, and ruling between columns and rows.
•A content type for a new graphic element. The content type specifies that the element is either
an anchored frame or an imported graphic object. When an end user inserts the element, the
dialog box that appears is either Anchored Frame or Import File.
•A marker type for a new marker element. The marker type specifies the purpose of the marker;
some possible marker types are index, glossary, and hypertext.
•A cross-reference format for a new cross-reference element. The format determines the wording
and punctuation for a reference, such as See page 17.
•An equation size for a new equation element. The equation size (small, medium, or large)
controls the font size and horizontal spread of characters.
•A variable for a new system variable element. The variable can be one of the built-in system
variables for dates and times, filenames, page and table information, and text for running
headers and footers.
The end user can change a marker type, cross-reference format, or other property (except for a
system variable) at any time, and the change is not considered to be a format rule override. If the
user re-imports element definitions and turns on “Remove Format Rule Overrides,” the properties
remain as the user has set them. An end user cannot change the variable in a system variable
element.
A format rule or clause can have another format rule nested inside it, and can also include a
context label to help end users select elements when inserting cross-references or preparing a
generated list.
In most respects, the context specifications for object format rules are the same as they are for
text format rules. Chapter 17, “Screen modes.” describes the context specifications and context
labels in all format rules.
You may want to define separate elements for imported graphics and anchored frames, and let
the end user select the one that suits his or her purpose. In this case, use descriptive element tags
as a guide for the user:
If you do not specify a graphic content type, the element uses the anchored frame type.
The initial content type is only a suggestion for the end user. The user can change an anchored
frame to an imported file or vice versa (using either the Anchored Frame or the Import FIle dialog
box), and the change is not regarded as a format rule override. If the user re-imports element
definitions with “Remove Format Rule Overrides” on, the graphic does not return to the content
type suggested by the EDD.
AnchoredFrameStyle and InsetStyle are names of the object style defined in the template where
the EDD is to be imported.
Type Purpose
Author, Equation, Identifies the source of an entry for a generated list or special
Glossary, or Subject type of index.
Comment Attaches a nonprinting comment to a location.
ConditionalText Identifies content that is conditional.
CrossRef Marks a source location for a spot cross-reference. (Used only for
a cross-reference source that is not an instance of an element or
paragraph format.)
HeaderFooter$1 or Marks a point in the flow where an end user wants the text of a
HeaderFooter$2 header or footer to change. In a Running H/F system variable, the
$marker1 or $marker2 building block reads this marker.
Hypertext Attaches a hypertext command to a location.
Index Identifies the source of an entry for a standard index.
Type 11 Identifies markup entities and processing instructions.
Type 12, … Type 25 Identifies the source of an entry for an unspecified type of index
or generated list, or identifies a source used by a structure API
client.
A marker’s text provides the content of the marker, such as the text for an entry in a generated
list or the command syntax for a hypertext command. When the end user inserts an instance of
the marker element, he or she enters the marker text.
If you do not set a marker type, the element is preset to whatever marker type the end user last
selected in Insert Marker or the Marker window.
The initial marker type is only a suggestion for the end user. The user can change a marker to
another type (using either Insert Marker or the Marker window), and the change is not regarded
as a format rule override. If the user re-imports element definitions with “Remove Format Rule
Overrides” on, the marker does not return to the type suggested by the EDD.
If you do not set a cross-reference format, the element is preset to whatever format the end user
last selected in the Cross-Reference dialog box.
The initial cross-reference format is only a suggestion for the end user. The user can change a
cross-reference to another format (using the Cross-Reference dialog box), and the change is not
regarded as a format rule override. If the user re-imports element definitions with “Remove Format
Rule Overrides” on, the cross-reference does not return to the format suggested by the EDD.
When importing markup documents, the cross-reference format may be specified through a
mapping of an attribute to the fm property cross-reference format. See Developer Reference,
page 116: is fm property for more information on this property. If this has been done, then the
initial cross-reference format rule in the EDD will be ignored. If no attribute in the markup has
been mapped to the fm property cross-reference format, then the Initial cross-reference format
rule in the EDD will be applied.
If you do not set an equation size, the element uses the size Medium.
The initial equation size is only a suggestion for the end user. The user can change an equation to
another size (using the Object Properties dialog box), and the change is not regarded as a format
rule override. If the user re-imports element definitions with “Remove Format Rule Overrides” on,
the equation does not return to the size suggested by the EDD.
If the selected element is a container, table title, table cell, or footnote, the scroll box on the right
shows text format rules instead of object format rules. For an example of this dialog box with text
rules, see “Screen modes” on page 238.
To display the formatting properties for a table format, select the format in the list on the right
and click Display Designer.
This chapter describes the context specifications and context labels in format rules. For a summary
of the formatting changes available, see “Screen modes” on page 213.
An element’s format rules or paragraph format can also be inherited from an ancestor. For
information on this, see “Screen modes” on page 207.
In this chapter
This chapter explains how to write EDD context specification rules for all element types. It contains
these sections.
•“Screen modes” on page 253
•“Screen modes” on page 253
•“Screen modes” on page 258
•“Screen modes” on page 260
•“Screen modes” on page 261
•“Screen modes” on page 262
All-contexts rules
A format rule can specify a formatting change that applies to an element in all contexts in which
it can occur. To write an all-context format rule, insert an AllContextsRule element, and then
define the formatting changes for the rule.
In this example, an InLineEquation element uses the Small equation size no matter where
the element occurs in a document:
Context-specific rules
A format rule can define one or more possible contexts, with formatting changes for each context.
The contexts are expressed in separate if, else/if, and else clauses. When applying a format rule to
an element, FrameMaker uses the first clause in the rule that is true for the instance of the
element. (Clauses in other rules may also apply.)
To write a context-specific format rule, insert a ContextRule element. An If element and a
nested Specification element are inserted automatically along with it. (The
Specification element does not have a label in the document window.) Type one or more
element tags to define the If context, and then define the formatting changes for that context.
If you need additional clauses in the format rule, you can insert and define any number of ElseIf
elements, ending with one Else element.
Defining a context
When defining a context, you can name the parent element or a list of ancestors. For a list of
ancestors, begin with the parent and then name successively higher-level ancestors, separating
the element tags with a less-than sign (<).
In this example, an Item begins with a bullet if it occurs in a List within a Preface, or with an
incrementing number if it occurs in a List within a Chapter:
The ancestors in a list can also be instances of the same element, to describe nesting within that
element. For example, this specification is true if an element’s parent is a Section that is a child
element of another Section:
Section < Section
Note that a nesting specification of this type is true whenever the current element is nested in at
least as many levels as shown in the rule. That is, Section < Section applies a formatting
change if the current element is nested within two or more Section elements. (For a way to
describe nesting that means exactly the level indicated, see “Screen modes” on page 258.)
OR indicators
Use OR indicators (|) to test the specification for any ancestor in a group. Separate the element
tags of the ancestors with an OR indicator, and enclose the group in parentheses. For example,
this specification is true if an element appears in a List within a Preface or a Chapter:
List < (Preface | Chapter)
Sibling indicators
Use a sibling indicator to describe an element’s location relative to its siblings. You can use the
indicator to describe the relationship of the current element to its siblings or of an ancestor
element to its siblings. Enclose the sibling indicator in braces ({ }).
To describe the relationship of the current element to its siblings, type the sibling indicator and a
less-than sign, and then continue with the parent and other ancestors. For example, this
specification is true if an element is the first element in its parent NumberList:
{first} < NumberList
To describe the relationship of an ancestor to its siblings, append the sibling indicator to the
ancestor’s tag. For example, this specification is true if an element’s parent is a Section in a
Chapter and the Section immediately follows a Title:
Section {after Title} < Chapter
You can also use a sibling indicator by itself as the entire context specification. For example, this
specification is true if an element is the only child element in its parent:
{only}
These are the sibling indicators you can use:
The sibling argument with the before, after, and between indicators can be an element
tag or the keyword <TEXT>. If you use <TEXT>, FrameMaker looks to see if the element is
preceded or followed by text rather than by a sibling element. A string generated by a prefix,
suffix, or autonumber is not considered to be text.
For Containers, Tables, and Footnotes: Rather than defining a first or last relationship between
siblings, you may want to write a first or last format rule for the parent. See “Screen modes” on
page 227.
Attribute indicators
You can also use an attribute name/value pair in a text format rule clause to more narrowly define
context. For the context specification to be true, an instance of the element must have the
attribute name and value specified.
If the element does not have an attribute value but the attribute is defined to have a default value,
the default value is used. If the attribute does not have a default value, you can test for an attribute
that has no value by specifying an empty string (attr ="") for the attribute value.
For object elements: When an end user inserts an object element that has an attribute in its
format rule, the Edit Attributes dialog box appears right away so that the user can provide an
attribute value—if the user has the element set to display this dialog box automatically.
To test an attribute of the current element, type the attribute name and value in brackets as the
context specification. To use an attribute with an ancestor, type the attribute name and value in
brackets after the ancestor tag. Separate the attribute name and value with an equal sign, and
enclose the value in double quotation marks. If the specification has a sibling indicator, put the
attribute information before the indicator.
For example, this rule specifies that an Item begins with a bullet if it occurs in a List that has a
Type attribute with the value Bullet, or it begins with an incrementing number if it occurs in
a List that has a Type attribute with no specified value:
By using attributes in format rules, you may be able to define fewer elements than you would
need to otherwise. With the List example above, you can have just one definition for List and
rely on attribute values to determine whether an instance of List is bulleted or numbered.
Without the attributes, you would need to define separate elements for bulleted and numbered
lists.
You can type straight or curved quotation marks around the attribute values (they are
automatically curved if you have Smart Quotes on in Text Options). If you need to type a double
quotation mark as part of a value, escape the mark with a backslash (\).
To use a set of attribute name/value pairs, separate the pairs with an ampersand (&). For the
specification to be true, an instance of the element must have all of the attribute pairs. For
example, this specification is true if the element’s parent is List and the element has a Type
attribute with the value Numbered and a Content attribute with the value Procedure:
List [Type = "Numbered" & Content = "Procedure”]
These are the operators you can use in attribute name/value pairs:
The definition for a Choice attribute includes a list of possible values. If you use a greater-than
sign or a less-than sign with a Choice attribute in a format rule, FrameMaker evaluates the name/
value pair using the order in the list of values, with the “lowest value” being the one on the left.
For example, this pair specifies any Security value that is to the left of Classified in the
defined list for the Security attribute:
Report [Security < "Classified"]
With the numeric attributes, you can also express a range of values by combining attribute name/
value pairs that use a greater-than sign or a less-than sign. For example, these pairs specify an
inclusive range from 12 to 20:
Note [Width >= "12" & Width <= "20"]
For information on defining attributes, see Chapter 21, “Screen modes.”
in the following order, FrameMaker would never apply the second clause because an Item in a
nested List also matches the first specification:
List
List < List
You get the effect you want by reversing the clauses.
Level rules
When defining the nesting depth of an element within levels of another element, you may find it
easier to use a level rule rather than a normal context rule. In a level rule, you name the ancestor
to the current element and then in each clause count the number of times the ancestor appears
above the current element.
For example, suppose you’re describing the nesting depth of a Head in Section elements. This
is how you would define it using a normal context rule:
Note that in context rules you need to go from the lowest level to the highest, but in level rules
the order of clauses is arbitrary so you can go from highest to lowest if you prefer. In context rules
Section < Section < Section means “nested in at least three Section elements,” and
in level rules a Section count of 3 means “nested in exactly three Section elements.” Because
the level counts are exact, you can specify them in any order.
To write a level rule, insert a LevelRule element. In the CountAncestors element that is
inserted automatically, type the element tag of the ancestor to count. Insert an If element (a
nested Specification element is inserted automatically along with it), and type the level
number of the ancestor. Then define the formatting changes for that level.
If you need additional clauses in the format rule, you can insert and define any number of ElseIf
elements, ending with one Else element. Each specification needs a level number and
formatting changes for that level. An Else clause includes a count of 0 unless there is an If or
ElseIf clause for that case.
Level rules are usually simpler than context rules (especially with three or more levels), because
you do not need to spell out the context in each clause.
You can name a list of ancestors in a level rule, and FrameMaker will count any ancestor in the list.
Separate the ancestors with a comma. For example, this specification is true if an element is
nested within the specified number of levels of any combination of Section and Chapter
elements:
Section, Chapter
You cannot mix context clauses and level clauses together in a single format rule, though you can
nest a context rule in a level clause or a level rule in a context clause, and one element definition
can have both kinds of rules.
The rule in this example is also applied to any Head and Para descendants of the Section.
For the first rule to be true, the hierarchy between the current Item and the closest Table
ancestor must include two List elements. For the second rule to be true, the hierarchy between
the Item and the Chapter ancestor must include two List elements.
Rather than having two rule clauses for the numbered-list contexts, you can have one main clause
with a nested rule (using a SubRule element) that describes the two variations:
You can nest a level rule in a context clause, or a context rule in a level clause.
Rather than repeating the Bold specification, you can break out that part into a separate rule for
all contexts:
Keep in mind that FrameMaker applies format rules in the order they appear in the definition, so
it is possible for a format rule to override an earlier rule. For example, if rule 1 changes the weight
of text in all contexts and rule 2 applies a different paragraph format in certain contexts, the
paragraph format overrides the change in the font weight.
Context labels
In some dialog boxes, FrameMaker displays a list of element tags for an end user to select from.
For example, a user selects element tags in the Set Up dialog box (Generate command) to set up
a generated file such as an index or a table of contents.
You may want FrameMaker to distinguish among instances of some elements in these lists. For
example, an end user might include Head elements in a table of contents when the parent of the
Head is a first- or second-level Section, but not when the parent is a more deeply nested
Section. To allow FrameMaker to distinguish element instances, you provide a context label
with formatting variations of the element.
In a dialog box, the end user sees an element once for each context label it can have and once for
all contexts in which no label applies. The user selects an element with a label to work with all
instances of the element from the context associated with the label.
To provide a context label in a format rule clause, insert a ContextLabel element after the If,
ElseIf, or Else specification, and type the text of the label. A context label cannot contain
white-space characters or any of these special characters:
( ) & | , * + ? < > % [ ] = ! ; : { } "
For example, this rule has a context label for different levels of Head elements:
In a dialog box that lists element tags, the end user sees the Head element like this:
Head(<no label>)
Head(1st-level)
Head(2nd-level)
You can use the same label in more than one clause or format rule. Context labels are not inherited
by descendants.
If multiple labels apply to an instance of an element (because of multiple rules with labels that
apply), only the last appropriate label in the definition is stored with the instance. Thus, only the
last label determines whether the instance appears in a generated list.
Part III provides details of the model FrameMaker uses for translating between markup data and
FrameMaker documents and on how you can modify this translation. You should be familiar with
the material in Part II, “Developing a FrameMaker Structure Application” before using the material
in this part.
The chapters in this part are:
•Chapter 17, “Introduction to Translating between Markup Data and FrameMaker” describes the
types of modifications you can accomplish with read/write rules, with a simple example of
using rules to create a structure application.
•Chapter 18, “Read/Write Rules and Their Syntax” describes the mechanics of writing read/write
rules and the document in which you define them.
•Chapter 19, “Saving EDD Formatting Information as a CSS Stylesheet” describes how formatting
information can be mapped to a CSS style sheet when you save a document as XML.
•The following chapters describe specific types of translation between markup elements and
FrameMaker constructs. Each chapter first describes the default translation, and then the
modification you can make with read/write rules:
–Chapter 20, “Translating Elements and Their Attributes”
–Chapter 21, “Translating Entities and Processing Instructions”
–Chapter 22, “Translating Tables”
–Chapter 23, “Translating Graphics and Equations”
–Chapter 24, “Translating Cross-References”
–Chapter 25, “Translating Variables and System Variable Elements”
–Chapter 26, “Translating Markers”
–Chapter 28, “Screen modes.”
FrameMaker can read and write markup data without any help from you. However, its default
translation of markup constructs may not be suitable for your DTD. In such cases, you have to
write a structure application to modify the translation.
In this chapter
This chapter talks about the information your application typically contains. It contains these
sections.
•Descriptions of the types of modifications to the default translation that you can make:
–“Screen modes,” next
–“Screen modes” on page 268
•An example to illustrate these points:
–“Screen modes” on page 269
•Discussion of locking XML and FrameMaker files:
–“Screen modes” on page 273
Treating special characters In SGML and XML you can use an entity to represent special
characters. You might use rules to translate such entities.
Note: XML: The XML specification establishes predefined character entities for reserved
characters such as angle brackets. By default FrameMaker translates these characters
correctly on import and export. However, you will need to specify read/write rules to
export such characters as a numeric references (&#XXXX;).
Making information implicit Not all information relevant to one representation is relevant to
the other. For example, you may have a type of table that always has two columns. In XML you
have an element for this table and do not need to explicitly indicate in the document instance
that the table has two columns. Nevertheless, in FrameMaker you need to specify a number of
columns when you insert the table. By default, the software writes an attribute containing the
number of columns on export; you can choose instead to specify this information in a read/write
rule.
Unwrapping structure You may have levels of hierarchical element structure in one
representation that are unnecessary in the other. If you are translating documents from one
system to the other and don’t need to translate those documents back again, you may decide to
simplify the element hierarchy.
Other rules There are a few rules that aren’t used for any of the above purposes. These rules are
discussed in detail in Developer Reference, Chapter 3, Read/Write Rules Reference Sections of the
chapter that describe examples of such rules include:
•Developer Reference, page 49: character map describes the rule that tells FrameMaker how to
map between characters in the SGML and FrameMaker character sets.
•Developer Reference, page 72: external dtd describes the rule that determines whether to
include an external DTD subset or to copy the specified DTD into the internal DTD subset. By
default, FrameMaker includes an external DTD subset.
•Developer Reference, page 141: line break describes the rule that tells FrameMaker how to
interpret line breaks when importing an XML or SGML document and when to generate line
breaks when exporting a FrameMaker document.
•Developer Reference, page 165: write structured document and Developer Reference, page 165:
write structured document instance only describe the rules that tell FrameMaker when saving
as markup whether it should write only a markup document instance or an entire document.
Working with the FDK requires C and FDK programming skills. The FDK allows you an arbitrary
amount of control over FrameMaker’s processing. For this reason, there is no way to briefly
describe the possibilities here.
During import, your FDK functions can inspect or modify the structure, format, or content of the
FrameMaker document being constructed. FDK functions can process attribute values, processing
instructions, and some entity references encountered in the imported markup document.
During export, your functions can inspect the structure, format, and content of the exported
FrameMaker document. They can inspect and modify every generated portion of the markup
document before it is actually written, and they can create new text (data and markup) to be
inserted into the XML or SGML document.
This manual does not describe how to create a structure API client, although it does occasionally
mention situations in which a client is appropriate. For information on creating structure API
clients, see the Structure Import/Export API Programmer’s Guide.
A detailed example
To give you a more concrete feeling for translating between markup and FrameMaker, this section
contains an example of a DTD fragment and the corresponding EDD fragment, rules for translating
between them, and snippets of related SGML and FrameMaker documents.
This section does not explain how to create the statements shown here. Later chapters provide
the details.
DTD fragment
Here is a fragment of the DTD:
<!--Shorthand for name of the system being described-->
<!ENTITY plan CDATA "Transportation 2000">
<!--Entities for special characters.-->
<!ENTITY oquote SDATA "open-quote">
<!ENTITY cquote SDATA "close-quote">
<!--Parameter entity for text that can appear in a paragraph.-->
<!ENTITY % text "(#PCDATA | xref)*">
<!--Basic element structure-->
<!ELEMENT section - - (head, (para | list)*, section*)>
<!ELEMENT (head, para) - O (%text;)>
<!ELEMENT list - - (item+)>
<!ATTLIST list type (bullet | number) bullet>
<!ELEMENT item - O (%text;, list?)>
Document instance
A portion of a document instance written using this DTD looks like this:
EDD fragment
Here is an EDD fragment you might produce from the DTD fragment:
Element (Container): Section
General rule: Head, (Para | List)*, Section*
Text format rules
Element paragraph format: body
Element (Container): Head
General rule: (<TEXT> | Xref)*
Text format rules
1. Count ancestors named: Section
If level is: 1
Use paragraph format: head1
Else:
Use paragraph format: head2
Element (Container): Para
General rule: (<TEXT> | Xref)*
Element (Container): List
General rule: Item+
Attribute list
1. Name: Type Choice Optional
Choices: Bullet, Number
Default: Bullet
Element (Container): Item
General rule: (<TEXT> | Xref)*, List?
Text format rules
1. If context is: {first} < List [Type = “Number”]
Use paragraph format: 1Step
Else, if context is: List [Type = “Number”]
Use paragraph format: Step
Else, if context is: List < Item
Use paragraph format: 2Bullet
Else:
Use paragraph format: Bullet
Element (Cross-reference): Xref
Initial cross-reference format
1. In all contexts.
Use cross-reference format: NumOnly
Each element definition specifies formatting appropriate for that element and its descendants.
The Section element specifies body as the paragraph format for all text unless a descendant
specifies otherwise. The Head element specifies Head1 as the paragraph format if it occurs as the
child of a single Section element and Head2 if it occurs as the child of more than one Section
element. The Item element bases it’s formatting on the value of the Type attribute of the parent
List element.
FrameMaker document
With these rules and an appropriate template, FrameMaker translates the earlier SGML markup to
the following in a FrameMaker document window:
Given the above structured FrameMaker document, on export FrameMaker produces SGML
markup equivalent to that shown earlier. Without a structure API client, it doesn’t produce short
references or markup minimization.
•If you have enabled Network File Locking through File > Preferences > General, FrameMaker
locks both FrameMaker and XML documents that you are editing to prevent other users from
modifying files you have open. However, it uses different mechanisms for locking FrameMaker
and XML documents.
You can save an opened XML document as a FrameMaker document. You can work with the
resulting FrameMaker document as you would any other FrameMaker document. When you have
finished editing, you can save the result as XML.
Two configuration settings allow you to modify the default behavior. Since these settings are
made in maker.ini, they apply to all your structure applications. To change them, you must exit
from FrameMaker, change the setting, and then restart FrameMaker. Both settings are made in the
Preferences section of the configuration file:
•TreatXMLAsXML can be set to either On or Off; the default is On. When it is On, FrameMaker
retains the name of an imported XML document as described above. When it is Off,
FrameMaker uses the extension .fm for imported XML documents and by default saves them
as FrameMaker documents. In this case, the file naming and file typing for imported XML
parallels that for SGML.
•LockXmlFiles can also be set to either On or Off with a default of On. If the setting is On,
FrameMaker locks XML documents that are opened when TreatXMLAsXml is On. If
LockXmlFiles is Off, FrameMaker does not lock open XML documents.
Read/write rules are your primary device for modifying FrameMaker’s default translations. The
Developer Reference, Chapter 3, Read/Write Rules Reference describes each of the rules in detail.
In this chapter
This chapter describes the rules and how you create them. It contains these sections.
•General description of a read/write rules document:
–“Screen modes” on page 275
•Discussion of the significance of the order of rules in a rules document:
–“Screen modes” on page 276
•Discussion of the syntax of individual rules:
–“Screen modes” on page 277
–“Screen modes” on page 278
–“Screen modes” on page 278
–“Screen modes” on page 279
•Splitting the rules for an application between several files:
–“Screen modes” on page 280
•Names you shouldn’t use for your FrameMaker elements:
–“Screen modes” on page 280
•User interface commands you use when developing a read/write rules document:
–“Screen modes” on page 281
content of the document and not its structure. Keywords in rules cannot include non-breaking
hyphens.
Important: Eight-bit characters, greater than 0x80, are not supported in filenames
occurring within read/write rule files. For portability, avoid using those characters in
filenames within read/write rule files.
To create a new read/write rules document, choose File>Developer Tools>New Read/Write Rules.
This command creates a new rules document, using the template it finds in $STRUCTDIR/
default.rw. For information on the location of $STRUCTDIR, see “Screen modes” on
page 131.
The first rule in a rules document must be:
fmsgml version is "<version>";
The string only includes one level of “dot” releases. For example, you would use the string "7.0"
even though the product version may be an incremental release above 7.0, such as 7.1 or 7.2.
Most rules are relevant all the time—for example, a rule to convert the general entity pname to
the FrameMaker variable Product Name. Some, however, are only relevant to certain situations.
For example, a rule to export graphics into external entities named graphic1.mif,
graphic2.mif, and so forth is relevant only when exporting FrameMaker documents. It is not
relevant when exporting an EDD or when importing markup documents or DTDs, because these
situations do not require generating entity names for graphics.
There is so much overlap in the rules that FrameMaker adopts the strategy of having one
document specify all rules, rather than using a separate document for each type of operation:
import of a DTD, import of an XML or SGML document, export of an EDD, or export of a
FrameMaker document. Most rules are expressed from the markup perspective; the element of an
element rule is the XML or SGML generic identifier, not the FrameMaker element tag. The only
exceptions to this convention are rules for FrameMaker constructs that have no counterpart in
markup. For example, a rule might specify dropping FrameMaker markers on export.
A single rules document can also contain rules that do not apply to a particular document. This
allows the same rules document to be used with several related document types, even if rules
exist for constructs used in only some of them. Markup and FrameMaker provide the same
flexibility, by allowing a DTD or EDD to define constructs that are never used. Because unused
rules can also result from spelling errors in generic identifiers and in the names of other
constructs, FrameMaker issues warning messages in the log file when rules refer to constructs that
do not exist.
Rule order
Although the first rule in a read/write rules file must specify the product version, in general the
order in which other rules appear is not significant. The only time rule order is significant is when
multiple rules apply equally to the same situation. In such cases, the software uses the rule that
appears first in the document. For example, assume you have these rules:
element "list" is fm element "List";
element "list" is fm element "Procedure";
element "proc" is fm element "Procedure";
These rules say that two different FrameMaker elements correspond to the same markup element,
and two markup elements correspond to the same FrameMaker element. FOr example, if you
import an XML document to FrameMaker with these rules, all occurrences of the XML list
element become List elements, and occurrences of the proc element become Procedure
elements. If you export a FrameMaker document to XML, both List and Procedure elements
become list elements. And no proc elements are created. The result is that if you start with an
XML document containing a proc element, import that document to FrameMaker, and then
export the result back to XML, the original proc element becomes a list element.
On the other hand, the order of the following rules does not matter:
fm attribute "XRefLabel" drop;
element "chapter"
attribute "xreflab" is fm attribute "XRefLabel";
The first of these rules tells the software to discard the FrameMaker XRefLabel attribute in any
element in which it occurs. The second rule tells the software to translate the FrameMaker
XRefLabel attribute to the XML xreflab attribute within the context of the Chapter
element. The effect of these two rules is to discard the XRefLabel attribute when it occurs in
any element other than the Chapter element.
Rule syntax
Rules use a syntax similar to C language syntax, in which each rule begins with a keyword and
ends either with a brace-enclosed group of subrules or with a semicolon. Names of markup and
FrameMaker constructs, such as elements, attributes, and entities, are represented by strings. For
information on strings, see “Screen modes” on page 278. Rules can be nested; that is, they can
occur inside one another. A rule nested inside another is called a subrule. One that is not nested
is called a highest-level rule. A typical rule containing a brace-enclosed set of two subrules is:
element "vex" {
is fm element "Verbatim Example";
attribute "au" is fm attribute "author";
}
In this example, element is the highest-level rule. The is fm element and attribute rules
are subrules of the element rule. The is fm attribute rule is a subrule of both the
element and attribute rules.
A single subrule can appear at the end of a rule without the enclosing braces. For example:
element "list" {
attribute "indent" drop;
}
is equivalent to
element "list" attribute "indent" drop;
Null rules, consisting simply of a semicolon, can appear wherever a rule is allowed.
Case conventions
For keywords of the read/write rules syntax, case is not significant. For example, the following are
equivalent for rules in a structure application:
fm version is "8.0";
FM Version is "8.0";
To improve readability, this manual sometimes uses mixed case for keywords.
The case of FrameMaker element tags and other FrameMaker names is always significant. Thus,
the following rules are not equivalent:
fm element "Default Element" drop;
fm element "default element" drop;
The significance of the case of SGML names is dependent on the NAMECASE parameter of the
SGML declaration. For XML the case is always significant, and your rules must match the case used
in the XML markup. For more information, see “Screen modes” on page 299.
String syntax
Strings are enclosed in matching straight or directional double quotation marks. Strings cannot
extend across more than one paragraph.
To incorporate special characters into strings, use the following conventions:
•\x followed by one or two hexadecimal digits is interpreted as a hexadecimal character code.
•\0 (backslash zero) followed by one or two octal digits is interpreted as an octal character code.
•A backslash followed by one, two, or three other digits is interpreted as a decimal character
code.
•A backslash immediately preceding any character other than a digit or the letter x indicates that
the following character is part of the string. In particular, a double quotation mark or backslash
can be preceded by a backslash to enter it into a string.
Constant syntax
Some rules and parameter literals for entities accept a single constant character code instead of a
one-character string with a character code. In these cases, the constant character code takes a
slightly different format than it does within a string. In particular:
•A number starting with 0 (zero) followed by other digits is interpreted as an octal number.
•A number starting with 0x (zero x) followed by other digits is interpreted as a hexadecimal
number.
•Any other number is interpreted as a decimal number.
Variables in strings
FrameMaker defines a small set of variables that can be used within strings in particular rules.
These variables have the following syntax:
$(variable_name)
where variable_name must be a legal variable name. An example is the variable $(Entity).
The following table illustrates the conventions for entering strings. The strings occur within a rule
in which the variable $(Entity) is interpreted as CHIPS:
Comments
Comments can appear anywhere in a rules document where white space is permitted, except
within quoted strings. Comments, like those in C code, are surrounded by the delimiters /* and
*/. Tables, graphics, and equations can appear within comments but are erroneous elsewhere in
a rules document.
Include files
You can use the C notation for include files in a rules document. For example, assume you have
the following line in a paragraph by itself in a rules document:
#include "fname"
FrameMaker processes the file named fname as though its contents were inserted in place of the
include directive. The syntax of the filename is device-dependent.
You can specify a search path for include files in the structapps.fm file. The default search
path for an include file consists of the directory containing the original rules document and the
directory $STRUCTDIR/isoents/, where $STRUCTDIR is as defined in “Screen modes” on
page 131. In addition, these directories are added to the end of the search path you specify in
structapps.fm.
If you plan to use the same rules on different systems, avoid specifying directory names in the
#include directive. Instead, let FrameMaker find files in different directories through a search
path.
Important: File pathname tokens must be separated by a backslash character (“\”) and
you must escape the backslash character as follows:
$STRUCTDIR\\isoents
For information on working with the structapps.fm file, see “Screen modes” on page 133.
for each system variable your document uses, and specify rules to convert the element to a system
variable.
Typically, an EDD contains a significant amount of formatting information. FrameMaker uses this
information to map formatting properties to elements. This mapping depends on the given
element’s tag, its position in the document structure, and its values for specified attributes.
In XML this type of formatting information is typically expressed in a cascading stylesheet (CSS).
However, if an XML document specifies a CSS FrameMaker does not use the CSS when it opens
the XML. Instead, FrameMaker uses the formatting that is specified in the template—definitions
in the format catalogs, plus the formatting rules specified in the template’s EDD.
When you save a FrameMaker document as XML, you may want to generate a CSS for the XML or
you may want to use a CSS that was provided with the original XML document. To make that
decision, you should understand how to specify the actions FrameMaker will take, and you should
understand how FrameMaker generates a CSS.
In this chapter
This chapter discusses how to generate a CSS in FrameMaker, and how EDD formatting
information translates to a CSS. It contains these sections.
• Descriptions of the types of modifications to the default translation that you can make:
– “Screen modes,” next
– “Screen modes” on page 290
Default translation
Even though an EDD and a CSS both assign formatting properties to elements according to similar
criteria, there are differences between the two. For example, in an EDD the indents of an element’s
text are specified absolutely; in CSS child elements inherit the indents of their parent elements,
and additional indents accumulate with the inherited values.
In addition, the CSS statements generated by FrameMaker may not work on all browsers. For
example, AcrossAllColumns and AcrossAllSideheads in an EDD translate to
display:compact in CSS—this CSS statement is currently supported by the Opera6 browser,
but not by NetScape Navigator 6.x or Internet Explorer 6.x.
Indent properties
Pagination properties
Advanced properties
EDD selectors This table lists element selectors for the element named XYZ
Differences in translation
The format rules in an EDD express some things in ways that don’t translate directly to CSS. The
following section describes these differences, and how FrameMaker resolves them.
In this case, the Para element uses italic text unless its parent Section element is the first of a
group of siblings. In that case, the Para element will be italic.
There is no mechanism in CSS to express this selection. To reproduce the formatting, FrameMaker
writes a special attribute to the affected Para element (in XML), and refers to that attribute in the
CSS. These attributes have the reserved name of fmcssattr.
For example, to reproduce the above effect in CSS and XML, FrameMaker writes the following for
the affected element:
para fmcssattr=”1”>
and it writes the following CSS statements:
para[fmcssattr=1] {font-style:italic;}
You should consider the following things when FrameMaker performs these actions:
• This is a modification to the XML, and it adds information that is specific to the FrameMaker
product. This is deprecated in markup, because an important aspect of markup is that it doesn’t
depend on any single product.
• If the XML complies with a DTD, the added attributes are likely to make the XML invalid.
• Unless you included these attributes in your EDD, you will get an invalid FrameMaker
document when you import the XML that includes these attributes. To avoid this result, you
can either define the attributes in the affected elements, or you can define read/write rules to
drop these attributes on read.
Because of these issues, you can disable this effect in your application definition that you specify
in structapps.fm. To disable this effect, you set AddFmCSSAttrToXml to Disable in your
application definition.
If Else rules
The use of an Else statement in the EDD translates into two CSS statements. For example, with this
statements in an EDD:
If Xref < Para Then color = Blue Else color = Black
the resulting CSS looks like:
Para > Xref{color: blue}
Xref {color = black;}
This will usually give appropriate results. There are circumstances when the EDD uses the order of
processing to limit execution, which result in CSS that can’t make the same distinction. For
example, if the EDD includes:
If Emphasis < Emphasis color = blue Else if Emphasis Italic = Yes
the resulting CSS looks like this:
Emphasis > Emphasis {color: Blue;}
Emphasis {font-style: italic;}
In the EDD, if the first clause is true then the second clause will not take effect—Emphasis will be
blue but not italic. With the CSS processing, the same element will appear both blue and italic.
Generating a CSS
When working with FrameMaker you can choose to generate a CSS on command or automatically
whenever you save a FrameMaker document as XML.
Important: You should not perform this action with a template file. To correctly generate
a CSS, FrameMaker must know which element is used as the root element for the
document. An EDD can define a number of ValidHighestLevel elements, but the CSS
must refer to only one. FrameMaker relies on actual use in the document to determine
which is the root element. Since a template usually has no content, FrameMaker cannot
make the determination. You should generate a CSS from a document that has content—
either use an existing document, or insert a ValidHighestLevel element in your
template before generating the CSS from it.
After you generate a CSS in this way, the stylesheet is not necessarily used by any XML documents.
If you specify the same path and file name as an existing CSS, and that CSS is used by an XML
document, the following will result:
• The new CSS will overwrite the older one.
• Any XML documents that specify a CSS of that path and file name will now use the new CSS.
Elements and their attributes are the fundamental components of both FrameMaker and markup
documents.
Most information in this chapter is “bidirectional.” It is about translations that can be recognized
and performed when both reading and writing markup documents and DTDs, and the examples
apply to both cases. You can start with a DTD containing element and attribute declarations and
produce the corresponding FrameMaker element definition, or you can start with an EDD
containing the FrameMaker element definition and produce the corresponding XML or SGML
element and attribute declarations.
In this chapter
This chapter gives you an overview of how FrameMaker translates between its representation of
elements and attributes and corresponding representations in markup.
This chapter provides general information about elements and their attributes. For specific
information on how to translate elements and attributes used for a particular purpose, see
Chapters 23 through 29.
This chapter contains these sections.
•How FrameMaker translates elements by default:
–“Screen modes” on page 296
–“Screen modes” on page 297
–“Screen modes” on page 299
–“Screen modes” on page 301
–“Screen modes” on page 301
•Some ways you can change the default translation:
–“Screen modes” on page 302
–“Screen modes” on page 303
–“Screen modes” on page 304
–“Screen modes” on page 304
–“Screen modes” on page 305
–“Screen modes” on page 306
–“Screen modes” on page 307
–“Screen modes” on page 308
Default translation
The basic representations of elements and attributes in markup and in FrameMaker are very
similar, facilitating the translation in both directions. This section provides information on how the
parts of element and attribute definitions translate by default.
Important: For importing and exporting XML, FrameMaker has limited support of double-
byte characters in markup tokens such as GIs and attribute names. For more information,
see “Screen modes” on page 101 and Developer Reference, page 27: Specifying the
character encoding for XML files.
SGML does not support double-byte characters in markup tokens.
When FrameMaker converts an EDD to a DTD, it performs the reverse translations. In the case of
a <TEXTONLY> general rule it produces a declared content of PCDATA for XML, and a declared
content of RCDATA for SGML.
Translating attributes
In markup, attribute declarations for an element occur in a separate attribute definition list
declaration. In FrameMaker, the attribute definitions for an element are directly part of that
element’s definition.
For example, assume you have the following declarations in SGML:
<!ELEMENT lablist - - (head, par?, item+)>
<!ATTLIST lablist
id ID #IMPLIED
type (num | bul) bul
sec (u | s | t) #REQUIRED>
By default, these translate to the following element definition in FrameMaker:
Element (Container): Lablist
General rule: Head, Par?, Item+
Attribute list
1. Name: Id Unique ID Optional
2. Name: Type Choice Optional
Choices: Num | Bul
Default: Bul
3. Name: Sec Choice Required
Choices: U | S | T
Note that the first two markup attributes become optional attributes in FrameMaker. In addition,
the interpreted attribute value specification given in the default value for the markup type
attribute translates to a default value in FrameMaker.
In general, any markup attribute that is not a required attribute (that is, doesn’t use the
#REQUIRED declared value) becomes an optional attribute in FrameMaker. If the markup
attribute has an attribute value specification, the interpreted version of that value becomes the
attribute’s default value in FrameMaker.
By default, a small number of markup attributes translate to formatting properties in FrameMaker.
This happens only in the case of graphics, equations, and tables that use a standard representation
recognized by FrameMaker. For information on these attributes, see Chapter 23, “Screen modes,”
and Chapter 24, “Screen modes.”
When FrameMaker writes a FrameMaker document as XML or SGML, it writes markup attribute
specifications for attributes with an explicitly supplied value. Such explicit values may be entered
directly by the end user, created by the FrameMaker cross-reference facility, or supplied by an FDK
client.
Conversely, on import of a markup document, if an imported element doesn’t include a value for
an attribute, then FrameMaker only supplies a value if the EDD includes a default value for the
attribute—otherwise FrameMaker doesn’t supply a value for such an attribute.
Note: XML: XML does not support all the declared values that are supported in SGML.
The following tables identify the declared values that are valid only in SGML. For XML,
substitute these declared values as follows:
•NAME, NUMBER, and NUTOKEN to NMTOKEN
•NAMES, NUMBERS, and NUTOKENS to NMTOKENS
On import, FrameMaker makes the following conversions in the absence of read/write rules:
On export, FrameMaker makes the following conversions in the absence of read/write rules:
will need to ensure the element and attribute names use only legal characters. Otherwise you will
need to write rules to reflect the differences.
Important: For importing and exporting XML, FrameMaker has limited support of double-
byte characters in markup tokens such as GIs and attribute names. For more information,
see “Screen modes” on page 101and Developer Reference, page 27: Specifying the
character encoding for XML files.
SGML does not support double-byte characters in markup tokens.
If you do not specify the name for an element or attribute when translating between markup and
FrameMaker, FrameMaker must pick a name to use. The chosen name has the same characters as
the original. For XML, FrameMaker preserves the case of names on import and export.
For SGML the case conventions are often different than case conventions in FrameMaker. To
ensure that the case of a name is appropriately chosen, FrameMaker uses this information:
•If specified, an element rule that explicitly translates a generic identifier to a FrameMaker
element tag
If an element rule gives both markup and FrameMaker names for an element, the software
uses the names and their case as specified.
•If specified, an attribute rule that explicitly translates a markup attribute name to a
FrameMaker attribute name
If an attribute rule gives both markup and FrameMaker names for an attribute, the software
uses the names and their case as specified.
•The NAMECASE parameter in the SGML declaration
If the NAMECASE parameter states that names are case sensitive, then the software preserves
the case of all characters on import and export. If the NAMECASE parameter states that names
are not case sensitive (as it does for general names in the reference concrete syntax, which
FrameMaker uses by default), then:
–On import, the software converts a generic identifier to an element tag that has an initial
capital letter followed by lowercase characters. For example, if a generic identifier is written
in the SGML document as part, Part, PART, or pArt, it becomes the FrameMaker
element tag Part. The software performs the same conversion for attribute names.
–On export, the software converts a FrameMaker element tag to a generic identifier that has
all lowercase characters. So, each of the FrameMaker element tags part, Part, PART, and
pArt, become the generic identifier part. The software performs the same conversion for
attribute names.
Important: If the NAMECASE parameter states that names are not case sensitive
(NAMECASE GENERAL YES), the same characters with different capitalization in
FrameMaker export as the same element GI or attribute name. For example, FrameMaker
elements named Part and part both export as the SGML element part, resulting in an
error. If the SGML declaration states that names are case sensitive, these FrameMaker
elements become distinct SGML elements as intended.
•It generates a record end at the end of every paragraph and flow in the FrameMaker document.
For information on how you can change this behavior, see Developer Reference, page 141: line
break.
Renaming elements
There are many reasons you may choose to rename elements when translating between markup
and FrameMaker. As already mentioned, the FrameMaker naming conventions are less restrictive
than those of SGML. If you wish to take advantage of this, you could rename your elements on
import and export.
Important: Note that read/write rules do not support double-byte characters, so you
cannot use rules to convert element names that have double-byte characters.
The general form of the rule for renaming an element is:
element "gi"
is fm element "fmtag";
where gi is a generic identifier and fmtag is a FrameMaker element tag. For example, if you have
an XML element par the FrameMaker element’s name is by default par. To change this default
behavior, you could use this rule:
element "par"
is fm element "Paragraph";
With this rule, import of a document or DTD translates the XML element par as the FrameMaker
element Paragraph. Conversely, export of a FrameMaker document or EDD translates the
FrameMaker element Paragraph as the XML element par.
For information on these rules, see Developer Reference, page 56: element and Developer
Reference, page 110: is fm element.
Renaming attributes
Just as you can choose to rename elements, you can choose to rename their attributes when
translating between markup and FrameMaker. You can rename an attribute either for all elements
in which it occurs or only for a particular attribute. To do so, you use one of these rules:
attribute "attr"
is fm attribute "fmattr";
element "gi"
attribute "attr"
is fm attribute "fmattr";
Important: Note that read/write rules do not support double-byte characters, so you
cannot use rules to convert attribute names that have double-byte characters.
where attr is a markup attribute name, fmattr is a FrameMaker attribute name, and gi is a
generic identifier.
The first form renames the attribute no matter in which element it occurs. For example, if you have
an XML attribute sec, the FrameMaker attribute’s name is by default sec. If this attribute occurs
in several elements and you want the same alternate name for all those elements, you could use
this rule:
attribute "sec" is fm attribute "Security";
With this rule, import of a document or DTD translates the markup attribute sec as the
FrameMaker attribute Security. Conversely, export of a FrameMaker document or EDD
translates the FrameMaker attribute Security as the markup attribute sec.
Sometimes you may wish to rename an attribute differently for different elements. For example,
assume you use an attribute named ref for the elements article and xref. If these attributes
have different meanings you may want to choose different names for them in FrameMaker. You
could use these rules:
element "article"
attribute "ref" is fm attribute "Reference";
element "xref" {
is fm cross-reference element "XRef";
attribute "IDref" is fm attribute "ID";
}
For information on these rules, see
•Developer Reference, page 46: attribute
•Developer Reference, page 56: element
•Developer Reference, page 104: is fm attribute
•Developer Reference, page 109: is fm cross-reference element.
In FrameMaker, a footnote element is always a footnote element. That is, you can’t import the
same element as a footnote in some contexts and as a normal paragraph in other contexts. If you
have a single markup element that can be formatted as both a footnote and as a normal
paragraph, you’ll need to translate the same markup element to two different FrameMaker
elements. This translation cannot be accomplished with read/write rules. In this case, you’ll need
to write a structure API client.
For information on these rules, see Developer Reference, page 56: element and Developer
Reference, page 112: is fm footnote element. For information on writing structure API clients, see
the Structure Import/Export API Programmer’s Guide.
The XML specification suggests a representation of a Rubi group that includes Oyamoji in a
container element as follows:
<ruby>
<rb>Oyamoji text</rb>
<rt>Rubi text</rt>
</ruby>
To translate this Rubi group, use these rules:
element "ruby" is fm rubi group element "MyRubiGroup";
element "rb" is fm rubi element "MyRubi";
element "rt" is fm rubi element "Oyamoji";
If the element named MyRubiGroup allows the Oyamoji element in its content rule (and if the EDD
includes a definition for the Oyamoji element) the markup will translate to FrameMaker data with
the following structure:
If the end user uses such constructs and exports that document to markup, the software reports
an error in the log file. If your application contains CDATA elements, you should make your end
users aware of this restriction.
you import a markup element containing a table of contents you may choose to have the software
generate a new version of the content instead of including the text of the element. To discard an
element’s content but retain its structure, use one of these rules:
element "gi"
reader drop content;
element "gi"
writer drop content;
For example, assume your DTD has this element declaration:
<!ELEMENT toc (#PCDATA)>
In markup, you depend on an application to create the appropriate content for the toc element.
In FrameMaker, you want to use its tools for generating a table of contents. To do so, first write
the rule:
element "toc" reader drop content;
To generate the appropriate content for the element on import to FrameMaker, you have two
choices. You can require the end user to manually call the Generate command, or you can create
an FDK client to generate the table of contents as the last step in importing the document. With
this rule, when you export the FrameMaker document to markup the toc element retains its
content in the exported document.
For information on these rules, see Developer Reference, page 56: element, Developer Reference,
page 55: drop content, Developer Reference, page 151: reader, and Developer Reference,
page 166: writer. For information on creating an API client, see the FDK Programmer’s Reference.
For example, if you have a comments element that should not print in the document but whose
content you do not want to lose, you can use these rules:
element "comments" {
is fm marker element;
marker text is content;
}
For more information on marker elements, see Chapter 27, “Screen modes.” For more information
on these rules, see Developer Reference, page 56: element, Developer Reference, page 115: is fm
marker element, and Developer Reference, page 142: marker text is.
Alternatively, you may not want to create a marker element from your markup element. If you do
not, there are other ways you could suppress display of the element’s content, but these methods
require you to write a structure API client. For example, you could have an API client attach a
condition tag to the element and then hide that condition tag. For information on creating
structure API clients, see the Structure Import/Export API Programmer’s Guide.
FrameMaker provides a rule to set up a default value for attributes in the EDD when you import
a DTD. To do this at the highest level, for all elements that use the relevant attribute, use this rule:
attribute "attr" implied value is "val";
where attr is a markup attribute and val is the proposed value for that attribute.
To specify a value only for the attribute within a particular markup element, use this rule:
element "gi" attribute "attr" implied value is "val";
where gi is a generic identifier, attr is an attribute in the element, and val is the proposed
value for that attribute.
In the above example, assume the default value for label should be ch for most of these
elements, but app for an appendix element. You can specify values to use in all cases with these
rules:
attribute "label" implied value is "ch";
element "appendix" attribute "label" implied value is "app";
Note that this rule is for importing DTDs and exporting EDDs. In FrameMaker, a default attribute
value can only be specified in the EDD, so this rule has no effect when importing an XML or SGML
instance, or when exporting a FrameMaker document. Also, the default value is used only to
initiate formatting. FrameMaker does not actually provide an attribute value for the element.
When you export the FrameMaker document, the software does not generate an attribute value
where there previously was none.
For more information, see “Screen modes” on page 196 and “Screen modes” on page 296 For
information on these rules, see Developer Reference, page 56: element, Developer Reference,
page 46: attribute, and Developer Reference, page 96: implied value is.
cdata id notation
entity idref idrefs
entities idrefs notation
group
For example, assume your DTD defines size as an attribute of type CDATA. If you know that
values of this attribute always represent real numbers, you can use this rule:
cdata attribute "size" is fm real-number attribute;
As another example, if your SGML DTD defines perc as an attribute of type NUMBER, you can use
this rule to change the attribute name:
NUMBER attribute "perc" is fm integer attribute "Percentage";
Be careful with the use of this rule. FrameMaker allows you to translate any declared value to any
attribute type. For instance, in the size example, if you are wrong that the attribute is always a
real number, your end users may encounter errors reading their markup documents.
For information on read-only attributes, see “Screen modes,” next. For information on these rules,
see Developer Reference, page 46: attribute and Developer Reference, page 104: is fm attribute.
Another common use of read-only attributes is for ID and IDREF attributes associated with cross-
references. Since FrameMaker can automatically maintain these attribute values for your end
users, you may choose not to let them manually modify the values.
To specify an attribute to be read-only, use the following rule:
attribute "attr" is fm read-only attribute ["fmattr"];
where attr is an attribute name in markup, and fmattr is a FrameMaker attribute name.
For information on these rules, see Developer Reference, page 46: attribute and Developer
Reference, page 104: is fm attribute.
The attributes font and weight indicate information needed to properly format the paragraph.
You can use format rules on the Par element to set the font family and weight on the basis of
these two attributes so you might use this element definition in your EDD:
Element (Container): Par
General rule: <TEXT>
Attribute list
1.Name: Font Choice Required
Choices: Helv | Times | Courier
1.Name: Weight Choice Optional
Choices: B | R
Default: R
Text format rules
1. If context is: [Font = “Helv”]
Default font properties
Family: Helvetica
Else, if context is: [Font = “Times”]
Default font properties
Family: Times
Else
Default font properties
Family: Courier
2. If context is: [Weight = “B”]
Default font properties
Weight: Bold
Else
Default font properties
Weight: Regular
In format rules, you can test for specific attribute values but cannot use the value of an attribute
to explicitly set a formatting property. For this reason, if the legal attribute values cannot be
enumerated in a format rule, you must write a structure API client to pick up the information. For
example, if your par element has a numeric attribute size intended to specify the font size and
you do not know what the legal set of font sizes will be, you cannot set the size font property from
that attribute value in a format rule. Instead, you must write an API client to set the size on import
of a markup document.
FrameMaker automatically handles certain FrameMaker formatting properties associated with
tables, graphics, and equations. For information on these properties, see Chapter 23, “Screen
modes,” and Chapter 24, “Screen modes.”
For information on writing format rules, see Chapter 15, “Screen modes.” For information on
creating a structure API, see the online manual Structure Import/Export API Programmer’s Guide,
included with the FDK.
Entities in markup serve a variety of functions in markup documents. These functions can be
represented in widely different ways in FrameMaker. FrameMaker does not have a single construct
that corresponds with entities in markup. For information on common uses of entities, see “Screen
modes” on page 93.
Processing instructions (PIs) in markup provide a mechanism for invoking system-specific actions
from within an XML or SGML document. These actions can be almost anything. By default,
FrameMaker interprets a small number of processing instructions. It stores others in the document
as markers—you can write an FDK client to process them at any time in the authoring cycle. You
can also use a structure API client to trap processing instructions and perform specific actions as
the parser encounters them.
In this chapter
This chapter discusses the default translations used by FrameMaker for processing instructions
and for entities of various kinds. The chapter also provides general information on how you can
modify these translations. Subsequent chapters discuss further modifications appropriate to
translating particular FrameMaker constructs such as variables or books. For information on the
processing instructions used for conditional text, see Chapter 28, “Screen modes.”; for those used
for books and book components, see Chapter 29, “Screen modes.”
This chapter contains these sections.
•How FrameMaker translates entities and processing instructions by default:
–“Screen modes” on page 316
–“Screen modes” on page 319
•Some ways you can change the default translation:
–“Screen modes” on page 326
–“Screen modes” on page 326
–“Screen modes” on page 327
–“Screen modes” on page 328
–“Screen modes” on page 328
–“Screen modes” on page 330
–“Screen modes” on page 331
–“Screen modes” on page 332
–“Screen modes” on page 333
Default translation
With few exceptions, FrameMaker preserves all of the entity structure of a document. When
exporting a document to XML or SGML, FrameMaker generates entity references for user variables,
graphics, equations, text insets, books, and book components by default. However, while it can
read a DTD that uses parameter entities, the software does not mark the replacement text as an
entity within the FrameMaker EDD. When you save the resulting EDD as a DTD, the result will not
include the parameter entities that were in the original DTD.
FrameMaker creates processing instructions (PIs) for a small set of special cases on export.
Similarly, on import it interprets only the same small set of processing instructions. It retains other
PIs as markers and translates them back into PIs on export.
FrameMaker preserves text entities that are references to external text files. On import, these
entities are translated as text insets to the referenced file. On export, the software writes the entity
reference in the XML or SGML instance; if the entity is not defined in the structure application’s
DTD, the software writes an entity declaration in the internal DTD subset for the exported
document instance.
If a referenced text file is an XML or SGML fragment (at least one element, but no SGML
declaration or DTD subset), the software interprets its structure according to the current structure
application. If the referenced file is text, the software treats the file’s text as the content of the
element containing the entity reference.
On export to markup
FrameMaker uses entities for text insets, user variables, graphics, equations, books, and book
components. If the entities are not declared in the structure application’s DTD, FrameMaker
generates appropriate entity declarations in the internal DTD subset of the exported document
instance.
If the FrameMaker document was made by importing an XML or SGML instance, and that instance
had entities declared in the internal DTD subset, FrameMaker will regenerate those entity
declarations when exporting the document to markup.
If the user created a FrameMaker document object that must export as an entity, and there is no
information the software can use to map that object to an existing entity declaration, the software
will generate a declaration in the internal DTD subset of the document instance.
For information on export of variables, graphics, equations, books, or book components, see
Chapter 26, “Screen modes,” Chapter 24, “Screen modes,” or Chapter 29, “Screen modes.”
Where text is the marker text, the software exports DOC PI markers as processing instructions
of this form:
<?text?>
and for SGML it exports DOC Entity Reference markers as entity references of this form:
&text;
Note that you cannot use a read/write rule to change the marker type FrameMaker uses to store
PI, entity reference, or PI entity information.
On import to FrameMaker
By default, FrameMaker interprets entity references as appropriate document objects, and saves
enough information to recreate the associated entity declarations on export. The software stores
information about the entity declaration in the following ways:
•The entity name is stored with the FrameMaker document object that corresponds with the
original entity reference (as it was in the XML or SGM).
•If the entity was declared in the internal DTD subset of the document instance, the software
stores that information on the Entity Declarations reference page of the resulting FrameMaker
document.
•If the entity was declared in the external DTD subset, the software assumes it will be declared
in your structure application’s DTD. No entity declaration information is stored with the
FrameMaker document.
In this way, the software can import and export entity references correctly. You can also modify
your DTD or use read/write rules to have FrameMaker treat some entities differently.
The rest of this section describes how FrameMaker imports various entities and unknown
processing instructions in the absence of rules or clients.
If the entity text has no markup characters (as in the first example), FrameMaker translates it to a
variable of the same name. If the document template does not define a variable of that name,
FrameMaker uses the entity text as the variable’s definition.
When importing SGML, if the template already contains a variable with that name, FrameMaker
uses the template’s variable definition. It is possible that this match between entity and variable
names is unintentional, but FrameMaker does not write a message to the log file. The file imports
without complaining and FrameMaker uses the template’s definition for the variable. However, in
all cases the information on the Entity Declarations reference page contains the full text from the
original entity declaration.
When importing XML, FrameMaker discards any definition of the variable in the template and
creates a new one from the XML document’s entity declaration.
For information on structure log files, see “Screen modes” on page 135.
Note: SGML: The default maximum length is 240 characters when no sgmldcl file is
included in your sgmlapplication file. If the replacement text is greater than 240
characters, FrameMaker imports the entity as plain text. Messages are written to the Error
Log stating, “The Normalized length or literal exceeded 240; markup terminated.” and
“Length of name, number, or token exceeded the NAMELEN limit”. If the entity text
contains any markup characters (as in the last two examples above), FrameMaker imports
the entity as plain text and discards all information about the entity reference.
For example, to translate the SDATA entity oquote to the directional open quotation mark ( “ )
in FrameMaker, you could use this declaration in your DTD:
<!ENTITY oquote SDATA "FM char: \xd2">
With this entity declaration, when FrameMaker encounters a reference to the oquote entity as it
is importing an SGML document, it replaces the reference with a directional open quotation mark.
When it encounters a directional open quotation mark as it is exporting a FrameMaker document,
it generates an oquote entity reference. In either case, you do not need rules to accomplish the
translation. For information on how FrameMaker interprets each of these parameter literals, see
the procedures in “Screen modes” on page 325.
If FrameMaker does not recognize the parameter literal, it translates the entity as a variable of the
same name, with the variable text determined as for internal text entities. If the template already
contains a variable with that name, FrameMaker uses the template’s variable definition.
If FrameMaker automatically creates the variable definition during import, it wraps the variable
text in the FmSdata character format. This character format distinguishes SDATA entity text from
regular text and tells FrameMaker what type of entity to create on export.
Note: SGML: The above example uses XML syntax. For SGML the notation would
exclude quotes for the notation identifier as follows: <!NOTATION cgm SYSTEM
cgm2mif>
Except for external text entities (see “Screen modes,” next), FrameMaker translates a direct
reference to an external entity as a marker of type DOC Entity Reference. For this reason,
we suggest graphic elements use an entity attribute to specify the entity reference.
For example, a reference to the above entity should be made in a graphic element’s entity
attribute. Given appropriate read/write rules to import the element as a FrameMaker graphic
element, the software would create an anchored frame that imports door.cgm by reference. For
more about importing graphic elements, see Chapter 24, “Screen modes.”
Note: XML: This use of an entity attribute to specify the entity reference is the only
method allowed by the XML specification to reference a nonparsed entity (such as a
graphic or a sound file).
If the entity declaration was made in the XML or SGML document’s internal DTD subset, the
software saves the entity information on the Entity Declarations reference page of the resulting
FrameMaker document. This will be used to reconstruct the entity declaration on export.
You can use a read/write rule to drop references to all external data entities on import;
see Developer Reference, page 71: external data entity reference.
If you reference an external data entity as the value of an attribute, you may want to write a rule
to import it as a FrameMaker graphic. For more information about using entity references in
attributes to import graphic files, see Chapter 24, “Screen modes.”
Parameter entities
Parameter entities can be referenced only within declarations. Typically they are used for such
things as defining common segments of content models or common attribute definition lists. The
following are examples of parameter entities:
<!ENTITY % subelts "(quote | emphasis | code | acronym)">
<!ENTITY % comnatt "id ID #IMPLIED
type CDATA #IMPLIED
security (ts, c, uc) uc">
FrameMaker expands these entities and imports their replacement text. On export, FrameMaker
exports only the entity replacement text.
accordingly. FrameMaker does not support SUBDOC entities. If you try to open an SGML
document that uses SUBDOC entities, the software reports an error in the log file and does not
open the file.
PI entities
Note: XML: The XML specification does not support PI entities—the following
information pertains to SGML, only.
PI entities are processing instructions in the form of entities. They are a convenient way of
providing one level of indirection, allowing the user to change the processing instructions in one
place if the document is moved to a different system. In addition, using a PI entity allows the
processing instruction to contain the PIC delimiter (> in the reference concrete syntax). The
following is an example of a PI entity:
<!ENTITY break PI "MYSYS: pgbrk">
Unless PI entities correspond to one of the forms supported by FrameMaker (to represent books
and book components), FrameMaker stores them in markers of
type SGML Entity Reference by default. In the above example, the marker text would be:
break
Processing instructions
Note: XML and SGML: The XML specification defines the PI closing delimiter as ?>,
while in SGML the closing delimiter is >. This section uses the XML specification to
illustrate PI syntax.
As stated at the beginning of this chapter, processing instructions in XML or SGML provide a way
to perform system-specific actions on a markup document. By default, FrameMaker recognizes a
small set of processing instructions. Those it does not recognize in a document instance it stores
in a marker of type DOC PI. (You can change the marker type used for this purpose with a rule.)
For example, if your document instance contains this processing instruction:
<?mypi?>
then FrameMaker creates a DOC PI marker with this marker text:
mypi
In addition to processing instructions for books, book components, and conditional text,
FrameMaker recognizes another processing instruction format it uses to create non-element
markers. For example, if your document instance contains this processing instruction:
<?FM MARKER [MyMarkerType] Some marker text here?>
then FrameMaker creates a MyMarkerType marker with this marker text:
Some marker text here
You can use a read/write rule to drop processing instructions on import or to specify a different
marker type to store this information.
Comments
While importing an XML document into a FrameMaker document, FrameMaker stores comments
in a marker of type DOC Comment.
<example>
<par>This is a paragraph.</par>
<?pi between pars?>
<par>Another paragraph.</par>
</example>
<?pi at end?>
FrameMaker aborts the import process when it encounters the <?pi at end> processing
instruction. Because the document is complete when FrameMaker aborts the parsing, the result
is a fully imported FrameMaker document. However, errors of this sort could affect structure
import/export clients that rely on parsing events that occur after the document is complete.
You can write an XSLT style sheet that handles these processing instructions before the XML is
parsed. You could discard them if they are not required, or, if the processing instructions are
relocated to a position before the start tag for the highest level element they will be saved as
markers on the Entity Declarations reference page.
As will be described in the following sections, you can modify the treatment of some entities
either by changing the entity declaration in the DTD or by adding a rule to your read/write rules
document. These modifications affect every instance of a reference to the specific entity. With
read/write rules, you can either drop an entity, import it as a text inset, or import it as a specified
non-element variable. You can also map the entity to an element that is stored on the SGML
Utilities reference page of the resulting FrameMaker document.
You can declare SDATA entities with FrameMaker parameter literal text. A parameter literal is a way
to declare in the entity itself how FrameMaker will translate the entity. If, for a single entity, you
have both an entity declaration with a FrameMaker parameter literal and a rule that applies to the
entity, the entity declaration takes precedence. For an example of parameter literal text, see
“Screen modes” on page 328.
For a summary of read/write rules relevant to translating entities, see Developer Reference, page
36: Entities.
Important: If you import an SGML document that inserts a FrameMaker system variable
into the document, you must save the file and update variables in the document before
system variables such as Creation Date (Long) appear. For information on updating
variables, see the information about variables in the using manual for FrameMaker.
You can choose to have this translation only happen on import of an SGML document. For more
information, see “Screen modes,” (the previous section).
For information on these rules, see Developer Reference, page 61: entity and Developer Reference,
page 139: is fm variable. For more information on the treatment of FrameMaker variables, see
Chapter 26, “Screen modes.”
The parameter literal in the entity declaration has the following form:
"fm char: code [in fmchartag]"
The entity rule has one of these forms:
entity "ename" is fm char "char" [in "fmchartag"];
entity "ename" is fm char code [in "fmchartag"];
where ename is an SGML entity, code is a character code (specified as either a 1-character string
or an integer constant, using the syntax for an octal, hexadecimal, or decimal integer described in
“Screen modes” on page 278). Note that if the desired character is a digit or a white-space
character, you must enter it as an integer. char is a one-character string and fmchartag is an
optional FrameMaker character tag.
Without the in clause, this parameter literal or rule causes FrameMaker to simply insert the
character specified by code or char when importing an SGML document.
Important: Special characters often require a font change. For either the rule or the
parameter literal, the in clause tells FrameMaker to insert the indicated character using
the specified character format. Note that the character format must specify a non-standard
font such as Symbol or Zapf Dingbats. Otherwise, this clause cannot override the
formatting for the parent element.
For example, to have an entity named cquote corresponding to the directional close quotation
mark ( ” ), you can add this entity declaration to your DTD:
<!ENTITY cquote SDATA "FM char: \xd3">
Alternatively, if your DTD contains an entity declaration such as:
<!ENTITY cquote SDATA "close-quote">
you can add one of the following rules to your rules document:
entity "cquote" is fm char "\”";
entity "cquote" is fm char "\xd3";
That is, your rule can specify a string with the special character or it can specify the numeric
character code. The numeric code can be octal, hexadecimal, or decimal; 0xd3, \xd3, and 211
all represent the same close-quote character.
For example, create a character format named Trademark, specify Symbol as the font family, and
turn on the superscript property. To translate the SDATA entity reg as a superscripted version of
the registered trademark character (®), you could use this declaration in your DTD:
<!ENTITY reg SDATA "FM char: 0xd2 in Trademark">
or have this rule in your rules document:
entity "reg" is fm char 0xd2 in "Trademark";
When FrameMaker encounters a reference to the reg entity when importing an SGML document,
it replaces the reference with ® (assuming your FrameMaker template defines the Trademark
character format appropriately). When exporting a document, if FrameMaker encounters ® in the
Trademark character format, it generates a reference to the reg entity.
If you translate entities as special characters, you may want to create entity palettes to make it
easier for your end users to put these special characters in a FrameMaker document. For
information on how to create entity palettes, see “Screen modes” on page 336.
DTDs frequently use the entity sets defined in Annex D of the SGML Standard, often called ISO
public entity sets, for providing commonly used special characters. FrameMaker includes copies
of these entity sets and provides rules to handle them for your application. For information on
how FrameMaker supports ISO public entities, see Developer Reference, Chapter 10, ISO Public
Entities
You can choose to have this translation only happen on import of an SGML document. For more
information, see “Screen modes” on page 327.
For information on the rules used in these examples, see Developer Reference, page 61: entity and
Developer Reference, page 107: is fm char. For information on the FrameMaker character set, see
Developer Reference, Chapter 11, Character Set Mapping in this manual, and see the FrameMaker
user’s manual.
The parameter literal in the entity declaration has one of the following forms:
"FM text inset: fname"
"FM text inset: fname in body flow flowname"
"FM text inset: fname in reference flow flowname"
The entity rule has one of these forms:
entity "ename" is fm text inset "fname";
entity "ename" is fm text inset "fname"
in body flow "flowname";
entity "ename" is fm text inset "fname"
in reference flow "flowname";
where ename is an SGML entity, fname is the document that is the source of the text inset, and
flowname is a flow in fname. The file named by fname does not have to be a FrameMaker
document. If it is, you can specify the flow to use. If you do not specify a flow, the main body flow
of the document is used.
For example, if you have a copyright notice on the main flow of a document named copy.fm,
you can use this entity declaration:
<!ENTITY copyrt SDATA
"FM text inset: copy.fm in body flow A">
Alternatively, you can use this rule:
entity "copyrt" is fm text inset "copy.fm" in body flow "A";
Insertion of a FrameMaker text inset in a document always inserts an end of paragraph in the
document. For this reason, you should only use this rule for entities that translate to entire
paragraphs or that occur only at the end of a paragraph.
By default, the structure of a text inset is retained and the text reformatted to match the
FrameMaker document into which it is placed. You may choose to change this behavior. For
information on how to do so, see “Screen modes” on page 334.
You can choose to have this translation only happen on import of an SGML document. For more
information, see “Screen modes” on page 327.
For information on these rules, see Developer Reference, page 61: entity and Developer Reference,
page 135: is fm text inset.
one or more anchored frames. To handle some of these cases, you can create a correspondence
between an SDATA entity and an element on a reference page in the FrameMaker template
associated with your application. To do so, use either the appropriate version of the entity rule
or the parameter literal.
The parameter literal in the entity declaration or the SDATA rule has the form:
"fm ref: fmtag"
The entity rule has the form:
entity "ename" is fm reference element "fmtag";
where fmtag is the name of an element on a FrameMaker reference page in the associated
FrameMaker template and ename is an SGML entity.
The fmtag element must occur in a flow named Reference Elements. That flow must be on
a reference page with a name that starts with SGML Utilities Page—for example, SGML
Utilities Page 1 or SGML Utilities Page Logos. For information on working with
reference pages, see the FrameMaker using manual.
When FrameMaker encounters references to the specified entity while importing an SGML
document, it copies the appropriate element from its reference page in the associated
FrameMaker template. When it encounters an instance of an element associated with one of the
reference pages while exporting a document, it generates an entity reference.
For example, to have an entity named logo correspond to an anchored frame with your
company’s logo, you can add this entity declaration to your DTD:
<!ENTITY logo SDATA "fm ref: Logo">
Alternatively, if your DTD contains an entity declaration such as:
<!ENTITY logo SDATA "[logo]">
you can add the following rule to your rules document:
entity "logo" is fm reference element "Logo";
You can choose to have this translation only happen on import of an SGML document. For more
information, see “Screen modes” on page 327.
For information on these rules, see Developer Reference, page 61: entity and Developer Reference,
page 127: is fm reference element.
If the referenced entity declaration was made in the DTD subset of the markup document,
FrameMaker stores information about it on the Entity Declarations reference page. On export, it
uses that information to generate entity declarations in the DTD subset of the markup.
Unless the source file is markup, insertion of a FrameMaker text inset in a document always inserts
an end of paragraph in the document. For this reason, you should be careful about which external
text entities must translate to entire paragraphs or occur only at the end of a paragraph.
FrameMaker has options to update text insets manually or automatically whenever the user opens
the document containing the text insets. By default, external text entities import as text insets that
update manually. Authors can select these text insets to change this setting through the user
interface.
An author can manually import markup fragments into a document as text insets. When exporting
to markup, FrameMaker might not have entity declarations for such user-created text insets. In the
absence of entity declarations, FrameMaker generates entity declarations with entity names of
ti1, ti2, etc.
To import copyrt as a text inset that references a flow named Copyright on the reference page
of an existing FrameMaker document named copyrt.fm, use this rule:
entity "copyrt"
is fm text inset "copyrt.fm" in reference flow "Copyright";
The source file can be of any document type that FrameMaker can filter automatically. Typically,
such files will be FrameMaker documents or text files, although you can use files created by other
word processing systems. Also, a FrameMaker text inset is always the entire contents of a flow or
file.
Insertion of a FrameMaker text inset in a document always inserts an end of paragraph in the
document. For this reason, you should use this rule for entities that translate to entire paragraphs
or that occur only at the end of a paragraph.
If the source of the text inset is a structured flow, the document that is importing it will not be
valid if the flow has a highest-level element. There is one exception however, for structured flows
that have SGMLFragment as the highest-level element. An SGML fragment is an SGML instance
that contains neither an SGML declaration nor a DTD subset. Opening an SGML fragment in
FrameMaker generates a structured document with a highest-level element named
SGMLFragment. When you import such a structured flow as a text inset, FrameMaker
automatically unwraps the SGMLFragment element so it’s children will be valid in the document.
By default, the structure of a text inset is retained and the text reformatted to match the
FrameMaker document into which it is placed. You may choose to change this behavior. For
information on how to do so, see “Screen modes,” next.
You can choose to have this translation only happen on import of a markup document. For more
information, see “Screen modes” on page 327.
For information on these rules, see Developer Reference, page 61: entity and Developer Reference,
page 135: is fm text inset.
entity "ename" {
is fm text inset "fname";
reformat as plain text;
}
entity "ename" {
is fm text inset "fname";
retain source document formatting;
}
where ename is the entity name and the is fm text inset rule has the arguments
described in “Screen modes,” (the previous section).
The meaning of these rules is as follows:
•reformat using target document catalogs: Retain the structure of the source
document and use the formatting contained in the target document. This is the default
behavior.
•reformat as plain text: Remove the structure of the source and use the formatting
contained in the target document.
•retain source document formatting: Remove the structure of the source and use
the formatting of the source text.
In a single entity rule, you can use one of these rules at most. Also, you cannot use one of these
rules as a subrule of an entity rule unless that entity rule also has an is fm text inset
subrule.
You can use any of these rules at highest level, to set the default treatment of all text insets. If the
source file is text or markup, these rules will have no effect. For example, for insets to FrameMaker
documents, if you always want the structure stripped from the inset and you want the text to
retain the formatting of the original document, you use this rule:
retain source document formatting;
For more information on these rules, see
•Developer Reference, page 61: entity
•Developer Reference, page 135: is fm text inset
•Developer Reference, page 153: reformat as plain text
•Developer Reference, page 153: reformat using target document catalogs
•Developer Reference, page 154: retain source document formatting.
for each document object. Without an entity declaration, on export the software cannot convert
the object into a DOC Entity Reference.
For more on creating hypertext documents, see the information about hypertext documents in
the FrameMaker User Guide.
Many documents require the use of tables to organize information into cells in rows and columns.
FrameMaker has a complete tool for creating tables and has a specialized element structure for
representing them. Markup does not standardize the representation of tables; each DTD can
represent tables differently. In practice however, many DTDs use the element and attribute
declarations for tables developed for the CALS initiative, which FrameMaker directly supports.
DTDs that do not use the CALS table model can have arbitrary representations for tables. To
support arbitrary table models, FrameMaker needs you to provide information in the form of read/
write rules.
FrameMaker supports the CALS table model in the sense that you can import XML and SGML
documents that use the CALS table model without providing read/write rules for the translation.
The software automatically recognizes these elements and attributes and creates corresponding
FrameMaker tables. In some situations, of course, you may choose to modify how the software
creates these tables.
In this chapter
This chapter discusses how FrameMaker interprets the CALS table model: what it does by default
when reading a markup document that uses CALS tables and how you can change that with read/
write rules. It also discusses the default handling of arbitrary tables and how you can change that
handling. It contains these sections.
•How FrameMaker translates tables by default:
–“Screen modes” on page 340
–“Screen modes” on page 343
•Some ways you can change the default translation:
–“Screen modes” on page 344
–“Screen modes” on page 345
–“Screen modes” on page 348
–“Screen modes” on page 349
–“Screen modes” on page 350
–“Screen modes” on page 351
–“Screen modes” on page 352
–“Screen modes” on page 352
–“Screen modes” on page 352
Default translation
FrameMaker represents tables and table parts as elements with substructure. The CALS model also
represents tables and table parts as elements with substructure. The two models are analogous,
but have several differences. You need to understand these models in themselves before you can
understand how the software translates between them. If you need help with these basics, read
the information described in the following paragraph before going on with the sections on import
and export that follow it.
For a description of how you use FrameMaker elements to represent tables, see Chapter 13,
“Screen modes.” For a description of the element and attribute structure of the CALS table model,
see Developer Reference, Chapter 7, The CALS/OASIS Table Model
On import to FrameMaker
If your DTD does not use the CALS table model and you create an EDD from the DTD or read a
markup document into FrameMaker, the software cannot identify elements that correspond to
tables and table parts. In this case, you need to write read/write rules to set up the
correspondence.
However, if the DTD uses the CALS table fragment, the software creates container and table part
elements corresponding to these declarations. The software retains some of the attributes in the
markup as attributes in FrameMaker. For other CALS attributes the software uses their values to
format the table when reading markup data. The following sections provide more details of the
default translation of CALS tables.
You can think of the software’s default behavior In translating CALS tables as though it had a built-
in set of read/write rules that identify the element and attribute structure of those tables.
Developer Reference, Chapter 8, Read/Write Rules for the CALS/OASIS Table Model describes the
rules that could be used to mimic this default behavior.
FrameMaker table element. Other elements, such as thead and entry, become table part
elements of the appropriate type.
The content model for a CALS tgroup requires thead and tfoot to precede tbody. However,
a FrameMaker table requires the table body to precede the table footing. When importing a
tgroup element definition, FrameMaker can switch the order of the tbody and tfoot elements
to match the order required for its tables, but only if the content model for a Tgroup is the
following:
<!ELEMENT tgroup - O (colspec*, spanspec*, thead?, tfoot?, tbody)>
For any other tgroup content model, FrameMaker might try to switch the order of the tbody
and tfoot elements upon import. However, because a tgroup content model can be arbitrarily
complex, we cannot guarantee a valid result. For that reason, the software displays a warning
message that says the content model for your table might be incorrect.
Important: In a FrameMaker table, the table heading must precede the table body, and
the table body must precede the table footing. If the resulting Table content model in your
EDD does not specify the correct order for table parts, you must modify the EDD.
Otherwise, tables will not import into your FrameMaker document.
Also, FrameMaker does not create elements corresponding to the colspec and spanspec
elements. These elements exist only for their attributes. When you open a markup document, the
software uses the attribute values for colspec and spanspec elements to create the
corresponding table. For more information, see “Screen modes” on page 342.
If you have this SGML element structure in a DTD:
<!ELEMENT table - - (title?, tgroup+)>
<!ELEMENT tgroup - O (colspec*, spanspec*, thead?, tfoot?, tbody)>
the software creates this FrameMaker element structure in the corresponding EDD:
Element (Container): Table
General rule: Title?, Tgroup+
Element (Table): Tgroup
General rule: Thead?, Tbody, Tfoot?
Notice that the software does not create an element of type table from the CALS table element.
The FrameMaker table model does not allow tables within tables. Because the software makes the
CALS table element a container element, it can support multiple tgroup elements within the
single table element.
In practice, many markup documents that use the CALS table model use only a single tgroup
element within a table. In this situation, it is more natural to translate the CALS table element
as a FrameMaker element of type table and to unwrap the tgroup element. If your structure
application includes a FrameMaker template, the software accommodates this behavior without
read/write rules.
That is, if the definition of the Table element in your FrameMaker template is as follows:
Element (Table): Table
General rule: Title?, Thead?, Tbody, Tfoot?
then when FrameMaker opens a markup document that uses the CALS table model, it
automatically unwraps the tgroup element to get this effect.
on the right. However, if the cell element has this attribute set to 0, then that cell does not have
a ruling on the right.
If you want to change how FrameMaker processes any attribute of a colspec or spanspec
element, you refer to the attribute as a formatting property.
On export to markup
By default, if your EDD does not use the CALS table model, FrameMaker performs no special
changes when writing the table and table part elements as elements in markup. It writes only the
element and attribute structure visible in the document. However, if your EDD or FrameMaker
document contains elements using CALS names, the software interprets those as CALS elements
unless you specify rules to the contrary. It creates the appropriate attributes corresponding to
attributes and formatting information of the table.
For example, assume you have this element structure in an EDD and you save it as an SGML DTD:
Element (Container): Table
General rule: Title?, Tgroup+
Element (Table): Tgroup
General rule: Thead?, Tbody, Tfoot?
FrameMaker creates these corresponding element definitions:
<!ELEMENT Table - - (Title?, Tgroup+)>
<!ELEMENT Tgroup - - (Thead?, Tbody, Tfoot’)>
If instead you have no element named Tgroup, and have this definition for Table:
Element (Table): Table
General rule: Title?, Thead?, Tbody, Tfoo?
the software creates the same element definitions as before. That is, it automatically creates the
required tgroup element, even though that element was not present in the FrameMaker
structure.
In addition to the element structure, the software creates the CALS attributes for the table’s
formatting properties and for any defined attributes.
Assume you have a document with CALS names for table elements. When you save it as markup,
FrameMaker does not create spanspec elements; it puts the equivalent information in the
colspec and entry elements for your table.
table. If you’ve got a different table model, you’ll have to use rules more extensively to create the
correspondence between markup and FrameMaker element structures.
For additional ways to modify the translation of tables, see the cross-references at the end of each
section. For a summary of read/write rules relevant to translating tables, see Developer Reference,
page 40: Tables.
<xsd:element name="Row"><xsd:complexType><xsd:sequence>
<xsd:element name="entry" type="xsd:string" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence></xsd:complexType></xsd:element>
<xsd:complexType name="tBdy"><xsd:sequence>
<xsd:element ref="Row" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence></xsd:complexType>
<xsd:complexType name="tHd"><xsd:sequence>
<xsd:element ref="Row" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence></xsd:complexType>
<xsd:complexType name="tFt"><xsd:sequence>
<xsd:element ref="Row" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence></xsd:complexType>
Read/write rule for a table
element "Table1" {
is fm table element "Table1";
fm property columns value is "4";
}
element "Title" is fm table title element;
For information on the rules used in these examples, see Developer Reference, page 56: element,
Developer Reference, page 133: is fm table element, and Developer Reference, page 134: is fm
table part element.
Column ruling: whether the specified column should having rulings on its right side. This
attribute says only whether or not to have the specified ruling; it does not specify what the ruling
should look like.
Column width: width of a single column.
Column widths: width of successive columns in the table. Each value is either an absolute
width or a width proportional to the size of the entire table. If proportional widths are used, the
pgwide attribute determines the table width.
For example, to specify that the first two columns are each one-quarter the size of the table and
the third column is half the size of the table, you could write a rule to specify your column widths
as "25* 25* 50*". Valid units and abbreviations for the column width formatting property
are:
Unit Abbreviation
centimeter cm
cicero cc
didot dd
inch in
millimeter mm
pica pc (or pi)
point pt
In FrameMaker dialog boxes, the inch unit can be represented by a double quotation mark (") as
well as the in abbreviation. However, this convention is not supported for the column width
formatting property. For example, 2" is invalid as an alternative to 2in.
Columns: number of columns in the table.
Important: If you plan to translate markup documents to FrameMaker and your table
declaration in markup does not include an attribute that corresponds to the number of
columns, you must use the fm property value is rule to set a value for this
property.
Maximum height: maximum height of a row in a table.
Minimum height: minimum height of a row in the table.
Page wide: relevant only to tables whose columns use proportional widths. In this case, the
attribute indicates whether the entire table should be the width of the column in which it sits or
of its text frame. If the value is unspecified or zero, the table is the width of the column; otherwise,
it is the width of the enclosing text frame.
Rotate: how much to rotate the contents of a cell. The CALS model restricts the value of this
attribute to a boolean, where 1 indicates a rotation of 90 degrees clockwise. FrameMaker extends
the possible values to allow rotations of 0, 90, 180, and 270 degrees. On export, if the attribute
has a positive value other than 180 or 270, the software interprets the value as 90 to be consistent
with the CALS model.
Row type: whether the associated table row is a heading, footing, or body row, or the
associated table cell occurs in a row of that type.
Row ruling: whether the cells of a row should having rulings on their bottom sides. This
attribute says only whether or not to have the specified ruling; it does not specify what the ruling
should look like.
Table border ruling: whether or not there is a ruling around the entire table. The possible
values are all, top, bottom, top and bottom, sides, and none. This attribute says only
whether or not to have the specified ruling; it does not specify what the ruling should look like.
(You can use a rule to set the look of the ruling.)
Column name: associates a name with a given column (specified with colnum).
Column number: specifies the number of the column named with colname. Columns are
numbered from left to right starting at 1. Also used to specify the column in which a cell appears.
End column name: specifies the name of a column that ends a straddle.
Horizontal straddle: how many columns this straddled cell spans.
More rows: specifies row straddling for a cell, so that the total number of rows the cell occupies
is morerows+1.
Span name: names a CALS spanspec element to allow an entry element to reference it.
Start column name: specifies the name of a column that begins a straddle.
Important: If you are not using the CALS table model and you want to specify straddling
information on export to markup, you should use only the horizontal straddle and
vertical straddle properties. The other straddle properties exist to support the
alternatives available in the CALS model.
For information on how to use the formatting properties for straddles with the CALS table model,
see Developer Reference, page 219: Attribute structure.
Note that these CALS attributes are retained in the FrameMaker document. This means you must
write format rules to use these attributes to format a table, but it allows you to control the
paragraph properties explicitly. For more information, see “Screen modes” on page 351.
These properties only exist for colspec and spanspec elements. Other elements must use
attributes to refer to this information.
Cell alignment character: relevant only if the align attribute is char. Determines the
character on which text aligns.
Cell alignment offset: relevant only if the align attribute is char. Determines the
location of the tab stop.
Cell alignment type: determines horizontal justification within a cell. Its legal values are
left, right, center, justify, and char. If this attribute is set to char, the cell acts as
though its autonumber were a tab character and is aligned around a character specified with the
char attribute.
Vertical alignment: determines vertical positioning of the text in a cell.
FrameMaker provides several rules for these purposes. If you include these rules, the software uses
them to determine what elements to create in the EDD and to translate instances of table
elements between FrameMaker and markup.
The rules for identifying and renaming table parts are as follows:
element "gi" is fm table element ["fmtag"];
element "gi" is fm table title element ["fmtag"];
element "gi" is fm table heading element ["fmtag"];
element "gi" is fm table body element ["fmtag"];
element "gi" is fm table footing element ["fmtag"];
element "gi" is fm table row element ["fmtag"];
element "gi" is fm table cell element ["fmtag"];
where gi is an generic identifier and fmtag is a FrameMaker element tag. The optional fmtag
argument allows the element to be renamed. If fmtag is not specified, the name remains the
same in the two representations.
If you identify a FrameMaker element as a table part, your document cannot use that element
outside a table. For example, assume you have the rule:
element "entry" is fm table cell element "Cell";
The corresponding EDD contains an element Cell. Documents created with this EDD should not
place the Cell element anywhere other than as a table cell. If they do so, the resultant document
will be invalid.
If your DTD has an element you identify as a table element and another element you identify as
a table part such as a table cell, it may not also include other elements that correspond to the
intervening table parts. For information on how FrameMaker handles this, see “Screen modes” on
page 354.
For information on these rules, see Developer Reference, page 56: element, Developer Reference,
page 133: is fm table element, and Developer Reference, page 134: is fm table part element.
attribute numc to represent the number of columns in the table. In this case, you would use the
rule:
attribute "numc" is fm property columns;
With this rule, the software interprets the attribute numc as the number of columns in a table for
all elements in which it occurs. If you use the same attribute for another purpose in another
element, you must write a local attribute rule to handle it appropriately.
Alternatively, you may have only one element, tab, representing a table. In this case, you should
restrict the association of numc with the columns property only to that element using this rule:
element "tab" {
is fm table element;
attribute "numc" is fm property columns;
}
With this rule, other elements can use the numc attribute for different purposes.
In both of these examples, the software doesn’t create structure that corresponds to the numc
attribute, but uses the attribute to read or write the appropriate information from instances of the
table element.
For information on the available table formatting properties and on the CALS attributes that map
to formatting properties, see “Screen modes” on page 345. For information on the rules used in
these examples, see Developer Reference, page 46: attribute, Developer Reference, page 56:
element, Developer Reference, page 133: is fm table element, and Developer Reference, page 116:
is fm property.
For example, you may have a markup element tab2 that represents tables with a 1-inch column
followed by a 2-inch column. The tab2 element does not use an attribute for this information but
you can translate tab2 to a FrameMaker table element as follows:
element "tab2" {
is fm table element "Two Table";
fm property columns value is "2";
fm property column widths value is "1in 2in";
}
In this case, when the software encounters a start-tag for a tab2 element on import, it creates a
table element named Two Table. The associated table has two columns, 1 and 2 inches wide.
When it encounters a Two Table table element on export, it writes a start-tag for a tab2
element. It does not write attributes for the number or widths of its columns.
Important: If your markup table declarations do not include an attribute that corresponds
to the columns property and you plan to open an associated markup document in
FrameMaker, you must use this rule to supply a value for the number of columns in the
table.
For information on the rules used in this example, see Developer Reference, page 56: element,
Developer Reference, page 133: is fm table element, and Developer Reference, page 80: fm
property.
For information on writing format rules, see Chapter 15, “Screen modes.”
to give FrameMaker other information such as which column a table cell should be in and the fact
that an element of this type indicates the start of a new row.
To tell FrameMaker which column a table cell goes in, you set the column number property on
that element, using this rule:
element "gi" {
is fm table cell element;
fm property column number value is "n";
}
where gi is a generic identifier and n is an integer indicating the table column. Table columns are
numbered starting with 1.
If you tell FrameMaker to put a table cell element in a particular column and there is already
content in that column, FrameMaker creates a new table row to hold the element. For example, if
you specify that the term element always occurs in column 1 and there are no vertical straddles
in that column, FrameMaker creates a new table row whenever it encounters that element. For an
example of this use of the column number property, see “Screen modes,” next.
Your tables can have vertical straddles: the element structure of such a table reflects a vertical
straddle by not having table cell elements in the straddled rows. FrameMaker cannot tell the
difference between a table cell element missing because of a straddle and a table cell element
missing because that cell has not yet been filled in. For this reason, it may not be enough to tell
FrameMaker that an element belongs in the first column to force it to start a new row for the
element. If your table can have vertical straddles and you want a particular element always to
occur in a new row, you should use these rules:
element "gi" {
is fm table cell element;
fm property column number value is "n";
reader start new row;
}
where gi is a generic identifier and n is an integer indicating the table column. Table columns are
numbered starting with 1.
For an example of this use of these rules, see “Screen modes” on page 357.
For more information on these rules, see:
•Developer Reference, page 56: element
•Developer Reference, page 134: is fm table part element
•Developer Reference, page 80: fm property
•Developer Reference, page 157: start new row.
Term Definition
Mouse A small animal
Cat A bigger animal
Elephant An even bigger animal
When this FrameMaker table is written as markup, the fm element rules specify that the
intervening levels of table structure are not written out. Consequently, the resulting markup looks
as it originally did.
For more information on the row type formatting property, see “Screen modes,” (the previous
section).
For more information on these rules, see
•Developer Reference, page 56: element
•Developer Reference, page 77: fm element
•Developer Reference, page 133: is fm table element
•Developer Reference, page 134: is fm table part element
•Developer Reference, page 80: fm property
•Developer Reference, page 160: unwrap.
With the modified definitions, you use modified rules. Since label is no longer part of the
markup element structure, you replace these rules:
element "glossary" {
is fm table element;
fm property columns value is "2";
}
element "label" {
is fm table cell element;
fm property row type value is "Heading";
}
fm element "GlossaryHead" unwrap;
fm element "GlossaryHeadRow" unwrap;
with these rules:
element "glossary" {
is fm table element;
fm property columns value is "2";
reader insert table heading element "GlossaryHead";
}
fm element "GlossaryHead" drop;
For more information on these rules, see:
•Developer Reference, page 56: element
•Developer Reference, page 77: fm element
•Developer Reference, page 133: is fm table element
•Developer Reference, page 134: is fm table part element
•Developer Reference, page 116: is fm property
•Developer Reference, page 151: reader
•Developer Reference, page 101: insert table part element
•Developer Reference, page 53: drop
•Developer Reference, page 160: unwrap.
simply whether or not a ruling should be applied. FrameMaker supports several ruling styles. To
specify the ruling style for the entire table, you can use the following rule:
reader table ruling style is "style";
where style is the name of a ruling style. This rule sets the ruling style for all tables. For example,
to set the outer borders of all tables that have outer borders to use a thick ruling style, you would
use this rule:
reader table ruling style is "Thick";
A ruling set in this manner is considered as custom ruling and shading by the software.
For information on formatting tables, see the FrameMaker user’s manual. For more information on
these rules, see Developer Reference, page 151: reader and Developer Reference, page 159: table
ruling style is of this manual.
For more information on these rules, see Developer Reference, page 166: writer, Developer
Reference, page 162: use proportional widths, and Developer Reference, page 150: proportional
width resolution is.
In your markup representation, you may choose to use an element structure such as the following:
<range>
<type>Lionfish</type>
<subtype>Clearfin</subtype><loc>Egypt</loc>
<subtype>Ocellated</subtype><loc>French Polynesia</loc>
<subtype>Spotfin</subtype><loc>Papua New Guinea</loc>
<type>Eel</type>
<subtype>Blue ribbon</subtype><loc>Fiji</loc>
<subtype>Moray</subtype><loc>Pretty much everywhere</loc>
</range>
The markup representation assumes that the formatting software knows that this should become
a 3-column table and that a cell containing a type element straddles all the rows that contain the
following subtype elements. The straddle ends just before the next type element.
Using read/write rules, to you can translate a single markup element that needs to be formatted
as one or more boxed paragraphs into a one-cell table in FrameMaker. To create the element
definitions above, use the following rules:
element "note" {
is fm table element;
fm property columns value is "1";
}
fm element "NoteBody" unwrap;
fm element "NoteRow" unwrap;
fm element "NoteCell" unwrap;
With these rules, FrameMaker creates the Note table element when it encounters a note
element while importing a markup document. The next thing it encounters is text to go into the
table, but text can’t directly be put into a table—it must go in a table cell—so the intervening
parts of the table need to be supplied. Since the markup doesn’t specify any child elements, the
software uses the structure specified in the EDD for a Note element. That is, it creates NoteBody,
NoteRow, and NoteCell elements and places the text in the NoteCell element.
On export, the software unwraps the NoteBody, NoteRow, and NoteCell elements and writes
out only the single note element.
For information on these rules, see:
•Developer Reference, page 56: element
•Developer Reference, page 77: fm element
•Developer Reference, page 133: is fm table element
•Developer Reference, page 80: fm property
•Developer Reference, page 160: unwrap.
For information on creating table formats, see the FrameMaker User Guide.
FrameMaker provides a set of tools for creating graphics or equations. It also provides tools for
importing graphic objects created with another software package into a FrameMaker document.
Markup, on the other hand, does not standardize the representation of either graphics or
equations; each DTD can treat them differently.
In FrameMaker equations are very similar to graphics. Both are placed within anchored frames,
and the anchored frames contain one or more objects—for graphics these are graphic objects,
and for equations they are terms of the equation. In the context of structure and import/export
of markup, an equation is treated as a single graphic object within an anchored frame.
FrameMaker does nothing to represent the equation’s terms as any type of structure. You cannot
use rules to describe the internal structure of equations. However, you can write a structure API
client to support a completely different model for equations (such as MathML).
FrameMaker has a default set of element and attribute definition list declarations for representing
graphics and equations as elements. You can use read/write rules to support variations of the
default representation, whether you start with an EDD or a DTD.
In this chapter
This chapter describes how FrameMaker translates graphics and equations and how you can
change that translation. It contains these sections.
•How FrameMaker translates graphics and equations by default:
–“Screen modes” on page 370
–“Screen modes” on page 377
•Some ways you can change the default translation:
–“Screen modes” on page 379
–“Screen modes” on page 380
–“Screen modes” on page 381
–“Screen modes” on page 383
–“Screen modes” on page 383
–“Screen modes” on page 384
–“Screen modes” on page 385
–“Screen modes” on page 386
–“Screen modes” on page 387
–“Screen modes” on page 388
Default translation
FrameMaker has well-defined representations for graphics and equations. They are given element
structure as graphic elements and equation elements. You can create a graphic in an external tool
and then import it into FrameMaker, you can use the software’s tools to create the graphic, or you
can combine methods. Whatever the method, the software puts the graphic into an anchored
frame in the document. For equations, you create an equation using the software’s equations
tools. FrameMaker treats the equation as a single graphic object inside an anchored frame and
exports this anchored frame to markup.
Code Meaning
CDR CorelDRAW
CGM Computer Graphics Metafile
DIB Device-independent bitmap (Windows® import only)
DRW Micrografx CAD
DWG Autocad Drawing
DXF Autodesk Drawing eXchange file (CAD files)
EMF Enhanced Metafile
EPSB Encapsulated PostScript® Binary
EPSD Encapsulated PostScript with
Desktop Control Separations (DCS)
EPSI Encapsulated PostScript Interchange
FRMI FrameImage
FRMV FrameVector
G4IM/GP4 CCITT Group 4 to Image
GEM GEM file
Code Meaning
GIF Graphics Interchange Format (Compuserve)
HPGL Hewlett-Packard® Graphics Language
IGES Initial Graphics Exchange Specification (CAD files)
JPG, JPE Joint Photographer Experts Group (actual file format is JPEG File
(JFIF) Interchange Format
MooV QuickTime Movie
OLE Object Linking and Embedding Client (Microsoft®)
PCX PC Paintbrush
PICT QuickDraw PICT
PNG Portable Network Graphic
PNTG MacPaint
SNRF Sun Raster File
SRGB SGI™ RGB
SVG Scalable Vector Graphics
SWF Adobe Flash®
TIFF Tag Image File Format
U3D Universal 3D
WMF Windows Metafile
XWD X Windows System Window Dump file
properties of the FrameMaker anchored frame in which the graphic sits inside a FrameMaker
document.
Note: XML: The XML specification states that an external graphic is a non-parsed entity
and must be referenced via an ENTITY or ENTITIES attribute in an empty element. This
corresponds very well with the preferred framework for representing graphics in a
FrameMaker structure application.
If the graphic file is specified in an entity declaration, the entity name is always kept with the
graphic inset in the FrameMaker document. Note, however, that there is no way to see the entity
name by inspecting a graphic inset. On export, this entity name becomes the value of the entity
attribute of the graphic element. If the graphic’s entity declaration is in the internal DTD subset of
the imported markup document, FrameMaker stores the information so it can recreate the entity
declaration on export. For information on how FrameMaker saves the entity definition, see “Screen
modes” on page 378. For information on how FrameMaker exports entity declarations, see “Screen
modes” on page 376. For information on how FrameMaker exports graphic files, see “Screen
modes” on page 376.
An external data entity has an associated notation, designed to tell the structure application how
to render the entity data. When the software reads a markup document, rather than storing this
information in attributes or variables in FrameMaker, it stores the information directly in the
graphic’s associated anchored frame. This results in fewer attributes on the FrameMaker element
than were on the markup element. When exporting a document to markup, the software recreates
this information in the attributes and entities it writes.
You can use rules to modify some of what FrameMaker writes on export, such as the name of the
entity or which, if any, of the graphic’s facets get written as files. There are few rules that relate
specifically to modifying what the software does to graphics on import.
On export to markup
Some properties of FrameMaker graphics and equations are not explicit in their element and
attribute structure and the software translates these properties as attributes in markup. These
properties are named so that you can refer to them in rules. For example, the align attribute
corresponds to the alignment property and indicates how an anchored frame is aligned on the
page.
Also, in some circumstances FrameMaker will write out a new graphic file when exporting a
document to markup. For more information, see “Screen modes” on page 376
Note: XML: For XML you should use the entity attribute to treat a graphic file as an
unparsed entity.
When FrameMaker encounters a graphic or equation on export, it writes a start-tag for an empty
element, including values for its attributes, as appropriate. Under some circumstances, it also
writes a file containing the graphic or equation itself. You can use read/write rules or a structure
API client to change these behaviors. For information about exporting graphic or equation files,
see “Screen modes” on page 376. For information on facets, see the FrameMaker user’s manual.
Graphic and equation elements have the same set of attributes describing common properties of
anchored frames. Graphic elements have additional attributes for properties relevant only to
graphics created outside FrameMaker. Finally, your EDD might define other attributes for a
particular graphic or equation element. The software exports these attributes as well.
•angle corresponds to the angle property and indicates an angle of rotation for the anchored
frame containing the graphic. The value is assumed to represent a number. The software
interprets this attribute as a number of degrees of rotation. You must specify exact multiples of
90 degrees. Otherwise, the value is ignored and the graphic is imported at 0 degrees (default).
For example, if 89 degrees is specified, the graphic imports at 0 degrees.
•bloffset corresponds to the baseline offset property and indicates how far from the
baseline of a paragraph to place an anchored frame. The value is assumed to represent a
number. If not supplied, the value is 0. The bloffset attribute is relevant only for anchored
frames whose position attribute is one of inline, sleft, sright, snear, or sfar.
•cropped corresponds to the cropped property and indicates whether a wide graphic should
be allowed to extend past the margins of the text frame. The value is either 0 or 1. If not
supplied, the value is 1, indicating that the graphic should not extend past the margins. The
cropped attribute is relevant only for anchored frames whose position attribute is one of
top, below, or bottom.
•float corresponds to the floating property and indicates whether the graphic should be
allowed to float from the paragraph to which it is attached. The value is 0 or 1. If not supplied,
the value is 0, indicating that the graphic must stay with the paragraph. The float attribute
is relevant only for anchored frames whose position attribute is one of top, below, or
bottom.
•height corresponds to the height property and indicates the height of the anchored frame.
If not supplied, the value for a single imported graphic object is the sum of the height of the
object plus twice the value of the yoffset attribute. For all other graphics and for equations,
the value is the height of the object.
•nsoffset corresponds to the near-side offset property and indicates how far to set a
frame from the text frame to which the frame is anchored. The value is assumed to represent
a number. If not supplied, the value is 0. The nsoffset attribute is relevant only for anchored
frames whose position attribute is one of sleft, sright, snear, or sfar.
•position corresponds to the position property and indicates where on the page to put the
anchored frame. If not supplied, the value is below. Possible values of position and the
corresponding FrameMaker property values are as follows:
•width corresponds to the width property and indicates the width of the anchored frame. If
not supplied, the value for a single imported graphic object is the sum of the width of the
object plus twice the value of the xoffset attribute. For all other graphics and for equations,
the value is the width of the object.
For more on these properties, see the Using FrameMaker for information about anchored frames.
For more on these properties, see the Using FrameMaker for information about importing graphics.
If: FrameMaker:
The graphic filename and entity name match an Uses the matching entity name as the value of the
entity declaration in the structure application’s graphic element’s entity attribute in markup.
DTD...
The graphic filename matches an entity Declares the entity in the DTD subset of the
declaration on the Entity Declarations reference resulting markup document. It uses the entity
page... name that was stored with the graphic inset for
the entity declaration and for the entity
attribute in the resulting graphic element in
markup.
The graphic filename matches no entity Generates an entity declaration in the DTD subset
declarations, or the graphic inset has no entity of the resulting document instance. It names the
name associated with it... entity graphic1, graphic2, etc. It writes the entity
name to the entity attribute in the resulting
graphic element.
The SGML graphic element does not include an Does not generate an entity declaration. The
entity attribute... filename for the graphic file is used as the value for
the file attribute of the SGML graphic element.
into the anchored frame. Note that the user may delete the existing graphic file and import
another one. If the new file matches a file in the DTD’s entity declarations, or it matches a file
on the Entity Declarations reference page, the exported markup will refer to this newly
corresponding entity.
For each one of such graphics and equations, the software creates a new graphic file. For
information on whether the software references the file via an entity or via the file attribute of the
graphic element in markup, see “Screen modes,” (the previous section).
A graphic element may be an anchored frame containing only a single imported graphic object.
If so, it is likely to have a single facet that isn’t one of the software’s internal facets. In this case, the
written file is in the graphic format indicated by the facet. For all other graphics and for equations,
the written file is in CGM format.
If FrameMaker exports the single facet of a graphic element, the software exports the file in the
indicated format and uses the facet name as the notation name. In all other cases, the software
exports the file in CGM format and its notation name is CGM.
For example, assume you have an instance of the Graph graphic element that contains graphics
you created with FrameMaker’s graphics tools. By default, the software creates the following
markup entity for it:
<!ENTITY graph1 SYSTEM "graph1.cgm" NDATA cgm>
Also, the entity attribute of the graphic element has a value of graph1 to correspond with the
above entity.
On import to FrameMaker
In the absence of read/write rules, FrameMaker cannot identify the elements and attributes of a
markup document that correspond to a graphic or equation. Therefore, it translates them as
container elements in the EDD. You must supply rules and perhaps a structure API client to reflect
the appropriate structure.
If your DTD uses the default graphic and equation declarations described in the preceding
sections, the only rule you need is one to identify the element as a graphic or equation. If you do
so, the attributes translate automatically. The translation occurs either if you started by creating
your DTD from an EDD or if you started with an existing DTD without declarations for graphics or
equations and added the default declarations. For a description of these declarations, see “Screen
modes” on page 371.
Your markup document can use either the entity attribute or (for SGML) the file attribute to
specify a graphic or equation. If a single element has specified values for both attributes, the
software uses the value of the entity attribute, ignoring the value of the file attribute.
FrameMaker accepts the name of any external data entity as a value for entity, regardless of
whether the entity is declared to be CDATA, SDATA, or NDATA.
element "gi" {
is fm graphic element ["fmtag"];
writer anchored frame { subrules }
}
where gi is a generic identifier, fmtag is an optional FrameMaker element tag, subrules are
described later, and facet is a graphic facet.
Use the first of these constructions to specify how the software exports an equation element
under all circumstances.
Use the second construction to specify how it exports a graphic element when that graphic
element contains only a single facet with the name specified by facet. This corresponds to the
situation where the graphic element is an anchored frame containing only a single imported
graphic object whose original file was in the facet graphic format.
Use the third construction to tell it how to export a graphic element under all other circumstances.
You can use the facet construction multiple times if you want the software to treat file formats
differently.
For example, assume you use the Graphic element for all graphic elements. If the graphic
contains any single facet, you assume the graphic was imported as an entity and you want the
default behavior. However, if the author used FrameMaker graphic tools to create the objects in
the graphic element, you want the file written in QuickDraw PICT format.
To accomplish all this, you would use this rule:
element "graphic" {
is fm graphic element;
writer anchored frame export to file "$(entity).pic" as
"PICT";
}
Because the entities specify graphic files that are unchanged, the software doesn’t create new
graphic files for those elements. However, if the author created a graphic using the FrameMaker
graphic tools, there is no corresponding entity. The software will write the graphic file in PICT
format, and create a corresponding graphic entity. The markup graphic element will refer to that
entity via the entity attribute.
For more information on these export options, see “Screen modes” on page 376 and “Screen
modes” on page 388. For information on these rules, see
•Developer Reference, page 43: anchored frame
•Developer Reference, page 74: facet
•Developer Reference, page 65: equation
•Developer Reference, page 56: element
•Developer Reference, page 111: is fm equation element
association of h with the height property to the pic element instead of using the form of the
rule that applies to all elements. You can use this rule:
element "pic" {
is fm graphic element "Picture";
attribute "h" is fm property height;
}
With this rule, other elements can use the h attribute for different purposes.
In both of these examples, the software creates an EDD from a DTD without creating an attribute
that corresponds to the h attribute. When importing or exporting markup documents, it uses the
attribute to read or write the appropriate information from the graphic.
The dpi and impsize attributes defined for graphic elements deserve special attention. For
each generic identifier that represents an imported graphic object, you can decide whether its size
is specified with the dpi or the impsize attribute. By default, the software uses the dpi
attribute, but you can change this default with the specify size rule. For information on this
rule, see “Screen modes” on page 392.
For information on the rules used in these examples, see Developer Reference, page 46: attribute,
Developer Reference, page 56: element, Developer Reference, page 113: is fm graphic element,
and Developer Reference, page 80: fm property.
FrameMaker document; you do not want your end users to have the option of importing by copy.
You can accomplish this as follows:
element "bitmap" {
is fm graphic element;
fm property import by reference or copy value is "ref";
}
When creating an EDD from a DTD, the software does not create an impby attribute for the
bitmap element. Consequently, when exporting a FrameMaker document to markup, it does not
try to write a value for the impby attribute. When importing a markup document, it automatically
sets the property value to ref.
For a summary of the FrameMaker graphic properties, see “Screen modes” on page 371. For
information on the rules used in this example, see Developer Reference, page 56: element,
Developer Reference, page 113: is fm graphic element, and Developer Reference, page 80: fm
property.
Note: SGML: In the above example, the dpi and sideways attributes are specified in
XML using NMTOKEN for the numeric value. For SGML you can use NUMBER.
Variable Meaning
$(entity) The value of the corresponding markup element’s entity attribute. If the
source of the graphic inset wasn’t originally a markup entity, this variable
evaluates to a unique name based on the name of the element.
$(docname) The name of the FrameMaker file, excluding any extension or directory
information.
For example, assume you have the default declarations for the graphic element and you have
this rule:
element "graphic" {
is fm graphic element;
attribute "entity" {
is fm property entity;
}
writer facet "XWD" {
notation is "xwd";
convert referenced graphics;
export to file "$(entity).xwd";
}}
With these rules, assume you imported a graphic element whose entity attribute had the value
of flower. When you export the FrameMaker document to markup, the software writes this
entity declaration:
<!ENTITY flower SYSTEM "flower.xwd" NDATA xwd>
It writes the graphic to a file named flower.xwd using the X Windows Dump format.
For more information on these rules, see:
•Developer Reference, page 69: export to file
•Developer Reference, page 144: notation is
•Developer Reference, page 46: attribute
•Developer Reference, page 116: is fm property
•Developer Reference, page 104: is fm attribute
•Developer Reference, page 56: element
•Developer Reference, page 113: is fm graphic element
•Developer Reference, page 111: is fm equation element
•Developer Reference, page 43: anchored frame
•Developer Reference, page 65: equation
•Developer Reference, page 74: facet
•Developer Reference, page 166: writer
facet; fname is the new filename; and format is the file format. The fname argument can use
these variables:
Variable Meaning
$(entity) The value of the corresponding markup element’s entity attribute. If the
source of the graphic inset wasn’t originally a markup entity, this variable
evaluates to a unique name based on the name of the element.
$(docname) The name of the FrameMaker file, excluding any extension or directory
information.
For example, FrameMaker writes CGM files for all equation elements by default. If you want it to
write QuickDraw PICT files instead, you can use this rule:
element "eqn" writer equation
export to file "eqn.pic" as "PICT";
For more information on these rules, see
•Developer Reference, page 69: export to file
•Developer Reference, page 56: element
•Developer Reference, page 113: is fm graphic element
•Developer Reference, page 111: is fm equation element
•Developer Reference, page 43: anchored frame
•Developer Reference, page 65: equation
•Developer Reference, page 74: facet
•Developer Reference, page 166: writer.
For example, assume you want to convert all graphic files to the PICT format. With the following
example, the software would create PICT files for every graphic:
element "graphic" {
is fm graphic element;
writer facet default {
convert referenced graphics;
export to file "$(entity).pic" as
"PICT";
}}
Depending on how a graphic element was created in your FrameMaker document, it would export
as follows:
You can use a similar rule to convert all graphic files of one format to another. With the following
example you can convert all TIFF files to PICT:
element "graphic" {
is fm graphic element;
writer facet "TIFF"{
convert referenced graphics;
export to file "$(entity).pic" as
"PICT";
}}
In the absence of an entity property value for the graphic inset, when the software exports an
external data entity for a graphic or equation, it generates a name for the entity based on the
element name. You can change the name with the entity name rule. The format of the
entity name rule is:
element "gi" {
is fm graphic_or_equation element ["fmtag"];
writer type ["name"] entity name is "ename";
}
where gi is a generic identifier; graphic_or_equation is one of the keywords graphic or
equation; fmtag is an optional FrameMaker element tag; type is one of the keywords
anchored frame, facet, or equation; name is a facet name you supply only if type is
facet; and ename is the entity name. In situations where there could be more than one entity
for a given graphic element, the software ensures unique entity names by appending an integer
to the end of the ename argument.
Assume authors import a graphic by reference into a FrameMaker element named Logo. Also
assume the graphic is in a file named cologo.tif in TIFF format, so you could use the rule:
element "logo" {
is fm graphic element;
writer facet "TIFF" {
entity name is "cologo";
}}
With this rule, the software creates a single instance of the following entity declaration in the
markup document’s internal DTD subset:
<!ENTITY cologo1 SYSTEM cologo1.tif NDATA TIFF>
For more information, see “Screen modes” on page 376. For information on specifying a graphic
filename, see “Screen modes” on page 387. For more information on these rules, see:
•Developer Reference, page 63: entity name is
•Developer Reference, page 56: element
•Developer Reference, page 113: is fm graphic element
•Developer Reference, page 111: is fm equation element
•Developer Reference, page 43: anchored frame
•Developer Reference, page 65: equation
•Developer Reference, page 74: facet
•Developer Reference, page 166: writer
A cross-reference is a passage in one place in a document that refers to another place, a source, in
the same document or a different document. While markup does not explicitly support cross-
references, it does provide the declared values ID, IDREF, and IDREFS for attributes; and
attributes using these declared values customarily represent cross-references. FrameMaker can
also use this model for cross-references within a FrameMaker document.
There are several differences between the FrameMaker cross-reference mechanism and the
customary way of interpreting the related markup attributes. For information on these differences,
see “Screen modes” on page 97.
In this chapter
This chapter starts by describing the default translation provided by FrameMaker. What
FrameMaker does by default differs depending on whether you start from an EDD or from a DTD
and whether you are working with SGML or XML. The chapter then describes how to modify the
default behavior. It contains these sections.
•How FrameMaker translates cross-references by default:
–“Screen modes” on page 394
–“Screen modes” on page 395
•Some ways you can change the default translation:
–“Screen modes” on page 396
–“Screen modes” on page 396
–“Screen modes” on page 397
–“Screen modes” on page 398
–“Screen modes” on page 398
–“Screen modes” on page 399
Default translation
On both import and export, FrameMaker assumes that elements having an attribute with a
declared value of ID can be the source of a cross-reference. It also assumes markup language
elements with declared content EMPTY that have an attribute with a declared value of IDREF are
for cross-references. So, by default, when processing a single markup document, FrameMaker
On export to markup
When creating a DTD from an EDD, FrameMaker translates ID attributes used for cross-reference
sources in the same way as any other attributes. FrameMaker translates a cross-reference element
as an empty markup element of the same name. The element’s attributes are exported as well. To
simplify export, your cross-reference element should have an IDREF attribute.
When creating a DTD, for each cross-reference element, FrameMaker creates an additional
impliable attribute, format, with the declared value CDATA. When exporting a FrameMaker
document, the value of this attribute is set to the name of the cross-reference format used by the
cross-reference. This attribute corresponds to the property cross-reference format in
read/write rules. Furthermore, in XML DTDs, FrameMaker also creates an impliable CDATA
attribute called srcfile. This attribute is used for external cross-references and cannot be
modified by read/write rules.
When exporting a document, FrameMaker exports ID and IDREF attributes as it does any other
attributes. Thus, if you have used an element for the source of your cross-reference and an IDREF
attribute on the cross-reference element, the export process works simply to provide a natural
markup representation.
If you define a cross-reference element without an IDREF attribute, then the software uses an
internal mechanism for storing cross-reference information. It does not export this information to
markup.
Whether or not the cross-reference element has an IDREF attribute, if the source of the cross-
reference is not an element, then FrameMaker exports the cross-reference element as text. That
is, the fact that an element was present in the FrameMaker document is lost; instead, the text
content provided by the cross-reference format appears in the markup document.
If the cross-reference source is external to the file when exporting a single file or external to the
book when exporting a book, then FrameMaker exports the cross-reference to SGML as text. It
exports such a cross-reference to XML as a cross-reference element, setting its srcfile attribute
to the URI of the file containing the source element with the ID of the source element as a
fragment identifier. In other words, the value of the srcfile attribute is the URI of the source
file followed by a # delimiter and the value of the ID attribute. See “Screen modes” on page 399
for examples.
A cross-reference source that isn’t an element is exported in the same way as any other
FrameMaker non-element marker. Its corresponding cross-reference exports as text in the way
described above.
For more information on FrameMaker’s representation of cross-references, see “Screen modes” on
page 196 of this manual and see the FrameMaker and FrameMaker user’s manuals.
On import to FrameMaker
When creating an EDD from a DTD, FrameMaker creates a cross-reference element when it
encounters an element declaration with declared content EMPTY that has an attribute with the
declared value IDREF or IDREFS. When it encounters any other element declaration with an
attribute with declared value IDREF or IDREFS, it creates an element and treats the attribute as
an ordinary attribute. When it encounters an attribute with the declared content ID, it creates a
FrameMaker UniqueID attribute.
When importing a markup document, FrameMaker creates the appropriate attribute in
FrameMaker if it encounters an attribute with the declared value ID. When it encounters an
element with a single attribute with the declared value IDREF and the declared content EMPTY,
it translates the element to a cross-reference element. If your markup document is invalid in that
it does not include both the IDREF attribute and its corresponding ID attribute, this process
results in an unresolved cross-reference. If your XML document also defines a srcfile attribute
for such an element, FrameMaker interprets its value as that of the URI of the cross-reference
source.
When importing a markup document, FrameMaker creates a cross-reference element when it
encounters an element with a single attribute whose declared value is IDREFS and declared
content is EMPTY. The software uses the first value in the IDREFS attribute as the ID of the cross-
reference. It saves the other values, to write out on export, but does nothing special with them.
You must write a structure API client to change this behavior.
element "exref" {
is fm cross-reference element "CrossRef";
attribute "exform" is fm property cross-reference format;
}
Instead of translating the cross-reference format as an attribute, you may choose to use the fm
property rule to explicitly set the property value. You can use the fm property rule for this
purpose.
You can use the is fm property rule to specify an attribute to use as a cross-reference Id.
For example, if the attribute linkend stores the IDREF for a markup element, you can set that
value to be the FrameMaker cross-reference ID property with the following rule:
attribute "linkend" is fm property cross-reference id;
On export, instead of writing the cross-reference Id to the IDREF attribute of the element, the
software will write that value to the linkend attribute.
For information on the rules used in this example, see
•Developer Reference, page 56: element
•Developer Reference, page 46: attribute
•Developer Reference, page 116: is fm property
•Developer Reference, page 109: is fm cross-reference element.
You use variables in FrameMaker documents to store information that may change at some later
time, such as a product’s name; information you know will change, such as the current date; or
text that you must enter frequently. Variables make it easier for you to manage these changes.
In markup, you can use either elements or entities for similar purposes. Some of the material in
this chapter is closely related to the handling of entities. For more information on entities, see
Chapter 22, “Screen modes.”
In this chapter
This chapter starts by describing FrameMaker’s default translation of variables. The chapter then
describes modifications you can make to the default behavior. Some of these procedures are
relevant when translating in both directions; others are relevant only in one direction.
This chapter contains these sections.
•How FrameMaker translates variables by default:
–“Screen modes” on page 402
–“Screen modes” on page 403
•Some ways you can change the default translation:
–“Screen modes” on page 403
–“Screen modes” on page 405
–“Screen modes” on page 405
–“Screen modes” on page 405
–“Screen modes” on page 406
Default translation
Markup has no unique representation for variables. There are two types of FrameMaker variables:
•User-defined variables provide an easy way to store information that may change. For example,
in an insurance policy document, you might represent the name of the insured person with the
variable Insured, which FrameMaker replaces with the name of the insured person for a
particular policy.
•System variables are used to insert system specific calculations, such as the current date or the
current page number. You cannot modify system variables.
In addition, FrameMaker provides system variable elements. These elements are reflected in the
structure of the document. You use them for the same purposes as system variables.
For more information on FrameMaker variables and system variable elements, see the
FrameMaker user’s manual.
On export to markup
FrameMaker translates a system variable element as an empty markup element. It does not record
the definition of the corresponding variable, because that is formatting information for the
element.
When writing a markup document, FrameMaker bases its treatment of non-element variables on
the variable text. Unless instructed otherwise, it translates a user variable to a reference to an
entity with the same name as the variable. If no entity definition with the given name exists,
FrameMaker creates a new entity definition using the variable name and variable text. If an entity
definition with the given name does exist, FrameMaker writes a message to the log file warning
of a potential mismatch.
If the variable name is not a valid name in markup, FrameMaker uses fmv1 as a default entity
name. If an entity already exists by that name, FrameMaker increments the counter until an
unused name is found, for example, fmv2, fmv3, and so forth.
FrameMaker determines the type of entity on the basis of special character formats within the
variable text. If the variable text uses the FmCdata character format, FrameMaker exports the
variables as a CDATA entity. If the variable text uses the FmSdata character format, FrameMaker
exports it as an SDATA entity. In the absence of any relevant character format information and
markup, FrameMaker exports the variable as a text entity. If the variable text contains markup,
then FrameMaker exports the variable as a CDATA entity.
XML: The XML standard does not allow SDATA and CDATA entities. If your document contains
variables that would translate to either of these entity types, FrameMaker exports them as text,
and the use of the variable will be lost the next time you import the XML data.
To retain the use of variables, you should map FrameMaker variables to specific XML elements.
(See “Screen modes” on page 405.) Also, you should never include markup in variables if you
intend to export your document to XML.
SGML: FrameMaker reports special characters within CDATA entities as errors. For SGML text,
external data, and CDATA entities, the entity text is the same as the variable text. For SDATA
entities, FrameMaker uses the string "FM variable" as the parameter literal.
FrameMaker translates a non-element system variable as a reference to an entity in SGML with one
of the following names:
On import to FrameMaker
By default, FrameMaker does not create system variable elements when creating an EDD from a
DTD. It creates user variables for entities of various sorts. For information on how FrameMaker
translates entities by default as variables, see “Screen modes” on page 319.
associated with the variable text. It also creates an entity declaration if one doesn’t already appear
in the internal DTD subset. For information on how character formats affect the translation of
variables on export, see “Screen modes” on page 402.
You can change the type of entity to which a variable translates by changing the character format
associated with the variable text in the variable definition.
For example, assume you have the FrameMaker variable Start Tag Ex with the variable text
<tag> and that you want to translate it to the SGML CDATA entity startex. To do so, use this
rule:
entity "startex" is fm variable "Start Tag Ex";
Be sure that Start Tag Ex uses the CDATA character format in its definition. That is, the
definition of the variable must be:
<CDATA>\<tag\><Default ¶ Font>
If startex is not declared in the DTD, FrameMaker inserts the following entity declaration into
the DTD subset when it encounters the first instance of the variable Start Tag Ex in the
document being processed:
<!ENTITY startex CDATA "<tag>">
SGML: If you want the variable to become an SDATA entity instead, change the variable
definition to:
<SDATA>\<tag\><Default ¶ Font>
In this case, if startex is not declared in the DTD, FrameMaker inserts this entity declaration:
<!ENTITY startex SDATA "<tag>">
If the DTD already has an appropriate entity declaration, FrameMaker retains that declaration.
In a similar circumstance, assume you map a text entity named product to a FrameMaker
variable, Product Name. If you have the following text entity declaration:
<!ENTITY product "Not yet named">
then with the rule:
entity "product" is fm variable "Product Name";
FrameMaker produces a reference to the general entity, but doesn’t create a new entity
declaration.
For information on the rules used in these examples, see Developer Reference, page 61: entity and
Developer Reference, page 139: is fm variable.
You use markers in FrameMaker documents to store various kinds of information you don’t want
visible to the document’s audience. Although there’s no analogous concept in markup, markers
frequently correspond to various attributes or elements.
FrameMaker provides a variety of marker types. Two of these marker types have special default
translations.
•DOC PI markers store information about some processing instructions, and DOC Entity Reference
markers store information about entity references.
•DOC Comment markers are used to store comments when FrameMaker imports an XML
document into a FrameMaker document. For information on this use of markers, see
Chapter 22, “Screen modes.” You can change which marker type FrameMaker uses to store this
information.
•Conditional Text markers indicate conditional text. For information on the treatment of
conditional text on export, see Chapter 28, “Screen modes.”.
In this chapter
This chapter describes the default translation of markers and modifications you can make to the
default behavior. Some of these procedures are relevant when translating in both directions;
others are relevant only in one direction.
This chapter contains these sections.
•How FrameMaker translates markers by default:
–“Screen modes” on page 408
–“Screen modes” on page 409
•Some ways you can change the default translation:
–“Screen modes” on page 409
–“Screen modes” on page 410
–“Screen modes” on page 410
–“Screen modes” on page 410
–“Screen modes” on page 411
Default translation
Markup has no special representation for markers. FrameMaker allows you to represent markers
either as marker elements or as non-element markers.
On export to markup
FrameMaker exports a marker element as an markup empty element of the same name, with two
additional attributes, text and type. The value of the text attribute is the marker text; the
value of the type attribute is the marker type.
Note: XML and SGML: The XML specification states that closing delimiter string for a PI
is ?>. The SGML specification simply uses >. Unless otherwise stated, the examples of PIs
in this section use the XML syntax.
FrameMaker exports non-element markers, other than those of Type DOC PI, as processing
instructions of the following form:
<?FM MARKER [type] text?>
where type is the marker type and text is the marker text. For example, FrameMaker exports
an Index marker with the text “translating, PIs” as:
<?FM MARKER [Index] translating, PIs?>
If a DOC PI marker has marker text of this form:
text
then FrameMaker outputs this processing instruction:
<?text?>
If a DOC Entity Reference marker has marker text of this form:
entname
where entname is the entity name, then FrameMaker outputs this entity reference:
&entname;
If a DOC Comment marker has marker text of this form:
text
then FrameMaker generates this comment:
<!-- text -->
You can use a rule to change the marker type whose text is treated in this manner.
FrameMaker uses the Cross-Ref marker type to mark the source of a non-element cross-reference.
On export to markup, these markers are treated as any other non-element markers are. They are
not treated specially to indicate the source of a cross-reference. For information on exporting
cross-references, see Chapter 25, “Screen modes.”
On import to FrameMaker
In the absence of read/write rules, FrameMaker cannot identify a markup element that
corresponds to a marker. If you have elements you want to translate as markers, you must write
rules.
However, if you start with an EDD instead of a DTD, the default DTD translates FrameMaker marker
elements as markup elements with a declared content of EMPTY. If you have a markup document
that uses this DTD, and your application specifies a FrameMaker template to use on import, then
it translates the appropriate markup elements to marker elements when you import the
document to FrameMaker.
Also, by default FrameMaker imports some entity references and processing instructions as non-
element markers. For information on when this happens, see Chapter 22, “Screen modes.”
While importing a markup document, FrameMaker stores comments in a marker of type DOC
Comment.
instructions, followed by a rule to drop all non-element markers. For example, to drop all non-
element markers except Index and Hypertext markers, use these rules:
fm marker "Index" is processing instruction;
fm marker "Hypertext" is processing instruction;
fm marker drop;
Since FrameMaker uses the first rule that matches in any given situation, the order of these rules
is important. If the rules occurred in this order:
fm marker drop;
fm marker "Index" is processing instruction;
fm marker "Hypertext" is processing instruction;
then FrameMaker would drop all non-element markers, including Index and Hypertext markers.
For information on the rules used in this example, see Developer Reference, page 78: fm marker,
Developer Reference, page 53: drop, and Developer Reference, page 140: is processing instruction.
For information on writing FDK clients, see FDK Programmer’s Reference, an online manual supplied
with the Frame Developer’s Kit.
Conditional text is a FrameMaker mechanism for specifying portions of a document that can be
included or omitted as needed. For information on working with conditional text, see the
FrameMaker User Guide.
In this chapter
This chapter starts by describing the default translation provided by FrameMaker. The chapter
then describes how to modify the default behavior. It contains these sections.
•How FrameMaker translates conditional text by default:
–“Screen modes” on page 415
–“Screen modes” on page 416
•How you can change the default translation:
–“Screen modes” on page 416
Default translation
To preserve conditional text in XML, two types of information are needed:
•Condition settings, including the condition tags defined in the FrameMaker document as well
as the condition indicators associated with each and whether the condition is shown or hidden
•Condition tags, if any, associated with each portion of the document’s content
Neither type of information is stored in elements in the FrameMaker document. Condition settings
are independent of the document’s element structure and one or more condition tags can be
applied to an element or to all or part of its content. FrameMaker therefore uses processing
instructions to represent conditional text in XML.
Condition settings
A separate processing instruction at the beginning of the XML document defines each condition
tag. This processing instruction has the form:
<?Fm Condition tag color style status?>
where
•tag is a condition tag
•color is the condition indicator color (AsIs if no color is specified)
•style is the condition indicator style, represented by one of the following keywords:
Keyword Condition Indicator (as defined in the Style pop-up menu of the Edit
Condition Tag dialog box)
NO_OVERRIDE As Is
OVERLINE Overline
STRIKETHROUGH Strikethrough
SINGLE_UNDERLINE Underline
DOUBLE_UNDERLINE Double Underline
CHANGEBAR Change Bar
NUMERIC_UNDERLINE Numeric Underline
NMRIC_AND_CHNGBAR Numeric Underline and Change Bar
•status is one of the keywords hide or show to indicate the show/hide status of the condition
tag
For example, the following processing instructions define conditions tagged Summer and
Winter:
<?Fm Condition Summer Blue OVERLINE hide?>
<?Fm Condition Winter Red SINGLE_UNDERLINE show?>
Conditional text
A conditional portion of an XML document’s content is delimited by processing instructions that
identify the applied condition tag. The processing instruction that precedes the conditional text
has the form:
<?Fm Condstart tag?>
while the one following the conditional text has the form:
<?Fm Condend tag?>
where tag is the condition tag. If multiple condition tags apply to the same content, each tag has
separate processing instructions.
For example, if a list of recipes uses condition tags to identify recipes with particular ingredients,
the list can be customized for people with various food allergies. Such a document might contain
markup such as:
<?Fm Condstart fruit?>
<?Fm Condstart blueberry?>
<recipe>Blueberry Muffins</recipe>
<?Fm Condend blueberry?>
<?Fm Condstart apple?><?Fm Condstart orange?>
<recipe>Apple Orange Fruit Cup</recipe>
<?FM Condend orange?><?Fm Condend apple?>
<?Fm Condend fruit?>
On export to markup
By default, FrameMaker exports processing instructions that define all condition settings. When
exporting a book, FrameMaker exports the condition settings for each book component after the
start-tag for the book component.
FrameMaker exports all conditional text, with surrounding processing instructions, regardless of
whether the conditional text is shown or hidden.
When hidden conditional text is exported, the result may not be a valid XML document. Suppose,
for example, that a course catalog begins with a Title element, and that only one Title is
permitted. Class offerings for different times of year might be edited in one conditional document.
The author might edit the titles for different versions as conditional text within a single Title
element or as different conditional Title elements. If the author takes the first approach, a valid
XML document might include the following fragment:
<Title>
<?Fm Condstart Summer?>Summer<?Fm Condend Summer?>
<?Fm Condstart Winter?>Winter<?Fm Condend Winter?>
Course Catalog
</Title>
However, the author might choose to enter different complete Title elements, making each of
them conditional. In this case, the exported XML document might include the following:
<?Fm Condstart Summer?>
<Title>Summer Course Catalog</Title>
<?Fm Condend Summer?>
<?Fm Condstart Winter?>
<Title>Winter Course Catalog</Title>
<?Fm Condend Winter?>
Since this fragment contains two Title elements where only one is permitted, the XML
document is not valid. If you expect such usage in your environment, you might want to permit
multiple Title elements in your DTD. If you expect only one Title to be shown at a time, the
EDD can still permit only a single Title. The use of slightly different models in FrameMaker and
XML allows FrameMaker documents to be validated prior to publishing to confirm that the show/
hide settings produce a document that conforms to the permitted structure. At the same time, it
supports export of hidden conditional text to valid XML.
On import to FrameMaker
When FrameMaker opens an XML document containing processing instructions for conditional
text, it sets condition settings according to the encountered <?Fm Condition?> processing
instructions. If multiple processing instructions refer to the same condition tag, FrameMaker uses
the first definition. If opening the XML document creates a FrameMaker book, FrameMaker uses
the first processing instruction for each condition tag after the start-tag for each book component.
Thus, a condition tag can have different condition settings in different book components.
If you import an XML document into an existing FrameMaker document, condition settings in the
FrameMaker document have priority over any defined in the imported XML document. In
particular, when creating an XML text inset, FrameMaker ignores any <?Fm Condition?>
processing instructions for existing condition tags but defines new condition tags for other <?Fm
Condition?> processing instructions.
FrameMaker applies the condition tags specified in <?Fm Condstart?> and <?Fm
Condend?> to the indicated content.
FrameMaker provides a mechanism for grouping multiple FrameMaker documents into a single
unit called a book. Each document remains a separate, complete FrameMaker document, but
FrameMaker provides a set of facilities for working with those documents as a unit. For example,
you can easily number pages consecutively throughout the book, generate a table of contents for
the entire book, print the entire book with one command, or validate the element structure for
the entire book.
Markup doesn’t explicitly provide such a mechanism. However, markup documents are sometimes
divided into external text entities so that a large document can be distributed over several files.
This use of text entities as include files is analogous to a FrameMaker book file, but markup allows
more freedom in specifying the files that correspond to a book:
•A FrameMaker book can have only one level of documents. A markup document can have more
than one level of nesting.
•A document in a FrameMaker book can either be unstructured or a single, complete element.
An external text entity can include a partial element.
Because of this difference, if you start with a markup document that doesn’t match the
FrameMaker model for books, the entity structure will not correspond to the book structure. On
the other hand, any valid FrameMaker book can be easily translated to markup with each book
component exported as a text entity.
In this chapter
Note: XML and SGML: The XML specification indicates that closing delimiter string for
a PI is ?>. Unless otherwise stated, the examples of PIs in this section use the XML syntax.
This chapter starts by describing the default translation for books. The chapter then describes your
options for modifying the translation. It contains these sections.
•How FrameMaker translates books and book components by default:
–“Screen modes” on page 418
–“Screen modes” on page 420
•Some ways you can change the default translation:
–“Screen modes” on page 421
–“Screen modes” on page 423
Default translation
Books in FrameMaker and their counterparts in markup don’t have special structure associated
with them in the EDD or DTD. For this reason, creating an EDD or a DTD doesn’t add book-specific
information. All translation is done during conversion of individual FrameMaker books or markup
documents.
On import to FrameMaker
FrameMaker does not attempt to automatically subdivide a markup document into FrameMaker
documents in a book. However, you can use processing instructions or read/write rules to signal
that a file is a book file and to signal the start of each new document in the book.
Note: XML and SGML: The XML specification defines the PI closing delimiter as ?>,
while in SGML the closing delimiter is >. Also, for XML the colon is omitted. For example,
following are two processing equivalent instructions—in SGML,
<?FM: book>; in XML, <?FM book?>.
This section uses the XML specification to illustrate PI syntax.
To instruct FrameMaker to generate a book, you can place the following processing instruction
before the start-tag of the document element of a markup document:
<?FM book?>
The book processing instruction may occur before, within, or after the DTD. It is an error if it occurs
elsewhere, if it is preceded by a document processing instruction (described next), or if it occurs
more than once.
Within the markup document, you indicate the start of a new document in a FrameMaker book
by placing a processing instruction immediately before the start-tag of the element that is the
highest-level element in the FrameMaker document. The processing instruction has the form:
<?FM document "fname"?>
where fname is the name of the new document file. If fname is a relative pathname, it is relative
to the directory for the book file. Any spaces within fname must be escaped by a backslash. If
fname contains the processing instruction close delimiter string (specified as > in the SGML
reference concrete syntax, and as ?> in XML), the processing instruction must be entered through
an entity. On export, FrameMaker generates fname from the name of the file it is processing.
You cannot omit the end-tag for an element that immediately precedes a processing instruction,
even if markup minimization is allowed (in SGML). If you did so, the parser would place the
omitted end-tag before the start-tag for the next element. Since this start-tag appears after the
processing instruction, the end-tag generates an error in the log file.
For example, assume you have a book broken into four parts—the front matter, two chapters, and
an index. In FrameMaker, each part is in a separate document. In SGML this situation might be
represented as:
<!DOCTYPE manual SYSTEM "manual.dtd"
<?FM boo?>
<manual>
<?FM document "title"?>
<front>
. . .
</front>
<?FM document "ch1"?>
<chapter>
. . .
</chapter>
<?FM document "ch2"?>
<chapter>
. . .
</chapter>
<?FM document "index"?>
<back>
. . .
</back>
</manual>
In FrameMaker this SGML structure appears as:
On export to markup
FrameMaker treats documents in a FrameMaker book as external text entities. In addition to the
file it creates for the entire book (the document entity), it creates a separate file for each structured
document. It also creates separate files for unstructured documents as necessary and generates
appropriate entity references for these additional files. FrameMaker also produces the processing
instructions that allow it to recreate the original book structure.
In particular, FrameMaker names the entities corresponding to documents in a book bkc1, bkc2,
and so on. If an entity name conflicts with the name of an existing entity, FrameMaker increments
the counter and tries again. For example, if your DTD already defines an entity bkc1, FrameMaker
tries instead to name the first book component entity bkc2.
Each book component entity declaration includes an external identifier containing a system
identifier derived from the document name by dropping any extension and adding a new
extension of the form .e01, .e02, .e03, and so forth. If there are more than 100 book
components, the extension has the form .001, .002, .003, and so forth.
For example, assume you have the book file with the structure shown earlier. On export,
FrameMaker generates this SGML document for that structure:
<!DOCTYPE manual . . . [
<!--Begin Document Specific Declarations-->
<!ENTITY bkc1 SYSTEM "title.e01">
<!ENTITY bkc2 SYSTEM "ch1.e02">
<!ENTITY bkc3 SYSTEM "ch2.e03">
<!ENTITY bkc4 SYSTEM "index.e04">
<!--End Document Specific Declarations-->
. . . other local entity declarations . . .]
]>
<?FM book?>
<manual>
<front>
&bkc1;
</front>
&bkc2;
&bkc3;
<back>
&bkc4;
</back>
</manual>
Each text entity starts with the appropriate document processing instruction. Thus, the entity
bkc2 has the form:
<?FM document ch1?>
<chapter>
. . .
</chapter>
When FrameMaker exports a book, it creates a new file for each structured document.
Unstructured documents appear as text within an element.
In general, you can use a different EDD for each document in a FrameMaker book. However, if you
export the book to markup, the result will be invalid unless the DTD provides a superset of the
element declarations used in all the EDDs.
For example, if you want instances of the chapter and section elements to indicate new files,
you can use these rules:
reader generate book {
put element "section" in file "Sect.fm";
put element "chapter" in file;
}
This will cause occurrences of section elements to create files named Sect1.fm, Sect2.fm,
and so on and occurrences of chapter elements to create files named chapter1.doc,
chapter2.doc, and so on.
FrameMaker does not create a new file if the element occurs inside an element that already
created a new file. For example, if you use the section element both to indicate a new file and
to indicate sections within a file, you can still use the rules above. A section element inside a
chapter element or another section element does not create an additional file.
With this form of the rule, FrameMaker always creates a book for these elements. If you want
FrameMaker to create a book only when it is processing documents with particular document
elements, use this form of the rule:
reader generate book for doctype "dt1" [. . . "dtN"]
put element "gi" in file ["fname"];
For example, if you want FrameMaker to create a book only if the document element is
reference or manual, you can use this rule:
reader generate book for doctype "reference", "manual" {
put element "section" in file "Sect";
put element "chapter" in file;
}
With this rule, if you import this SGML document:
<!DOCTYPE reference
. . .
<reference>
<chapter>
<section>Intro
. . .
</section>
. . .
</chapter>
</reference>
FrameMaker creates two files: a book file for the reference element, and a document file for
the chapter element. Since the section element occurs inside the chapter element, the
software doesn’t create a separate document file for it. On the other hand, if you import this SGML
document:
<!DOCTYPE chapter
. . .
<chapter>
<section>Intro
. . .
</section>
. . .
</chapter>
FrameMaker creates one file containing the entire structure; it does not create a separate book file.
For information on these rules, see Developer Reference, page 151: reader, Developer Reference,
page 93: generate book, and Developer Reference, page 146: output book processing instructions.
In addition to the default translation and the specific translations that you specify using read/write
rules and the API, FrameMaker can apply transformations on both import and export of XML files
that are specified by an XSL style sheet associated with an XML application.
In this chapter
This chapter describes the kinds of XSL transformations that are available on import and export
of XML, and how you can control them. It contains these sections.
•“Screen modes,” next
•“Screen modes” on page 426
•“Screen modes” on page 427
•“Screen modes” on page 428
Note: Entities XPath does not provide any way of referencing entities in an XML file, so
you cannot apply XSL transformations to entities.
•It looks first in the validated XML file. This can contain an XSL file specification if, for example,
the document was imported from an XML document containing an xml-stylesheet PI, and
Retain Stylesheet Information is enabled in the XML application.
•If there is no XSL file specification in the XML, FrameMaker looks for a PostProcessing element in
the XML application.
When it finds a valid XSL file specification, FrameMaker applies the XSL transformations to the
validated XML, and saves the result to the same XML output file.
XSLT errors
FrameMaker notifies the user if it encounters any of the following errors while attempting to apply
XSL tranformations:
•FrameMaker cannot find or read the referenced XSL file.
•The XSLT processor fails, because, for example, the XSL file is not valid, is not formed in
accordance with the W3C XSLT specification, or contains errors in XPath expressions.
•The result of XSLT preprocessing is a type of file that FrameMaker cannot open.
FrameMaker provides a robust and flexible set of tools for creating markup editing and publishing
applications. All general-purpose markup systems require application-specific information. You
can use FrameMaker to develop such an application in a set of steps, each of which is
straightforward.
The major parts of an application correspond to components in which the information is specified,
as follows:
The structure application bundles this information so that it can be easily accessed. Application
development involves creating these files along with data analysis, documentation, and
maintenance activities.
This chapter provides an overview of the development process. It contains these sections.
•“Screen modes,” next, examines the features and components of markup applications.
•“Screen modes” on page 433 summarizes the process of developing a structure application,
covering the steps common to many editing and publishing tools, and those unique to
FrameMaker.
•“Screen modes” on page 438 enumerates the tasks involved in developing a FrameMaker
application and defines the files containing modules of the application that the application
developer maintains.
Markup applications
A markup application is an application that manages and stores critical business information in a
markup format. Here, markup refers to either XML (Extensible Markup Language) or SGML
(Standardized General Markup Language).
There are two important aspects of markup that make it suitable for streamlining the creation,
maintenance, and delivery of critical business information:
•Open standards
•Formal structure
If you can take advantage of these aspects, you will see improvements in your publishing process,
and increased accuracy in the information you deliver. Because of open standards, you can share
your information with more people using a wider variety of software applications. If you take
advantage of the formal structure in markup, you can develop increasingly sophisticated ways to
automate your processes.
Part of the formality of markup is that it separates content from appearance. The way markup
separates a document’s content from its appearance and intended processing makes it a natural
format for single-source documents. However, the ability to use text in different ways requires that
each use be defined. In markup terminology, such a definition is called an application.
More precisely, the SGML standard (ISO 8879, Standard Generalized Markup Language) defines a
text processing application to be “a related set of processes performed on documents of related
types.” In particular, the standard states that an SGML application consists of “rules that apply
SGML to a text processing application including a formal specification of the markup constructs
used in the application. It can also include a definition of processing.” This definition applies
equally XML
Whether you are interested in XML or SGML, a publishing system that uses this technology is a
general markup application. A markup application is the sum total of the tools in your XML or
SGML publishing system. You work with these tools to author, process, and deliver your
information in a variety of formats that can include print, PDF, HTML, or business transactions.
Database Markup
Depends on a schema to define record Uses a type definition (DTD or XML Schema) to
layout define structural elements and attributes
Input forms facilitate data entry Configured XML or SGML text editor facilitates
data entry
Reports present customized summaries and Composed documents present information to
other views of information end user
The DTD and accompanying input and processing conventions comprise the rules that define a
markup application.
While markup applications need not include a visual rendering of documents—consider a voice
synthesizer, word count, or linguistic analysis tool—many of them do involve publishing.
Publishing is the process of distributing information to the consumer. Traditional publishing
involves preparation of written materials such as books, magazines, and brochures. Computerized
information processing facilitates the publishing of information in additional media, such as the
Internet, mobile applications or CD-ROM, and also provides the possibility of interfacing with
other applications, such as database distribution.
<taskmodule skill="adv">
<heading>Tuning a 5450A Widget</heading>
<warning type="1">Do not hit a widget with a hammer. Doing so
could cause explosive decompression.</warning>
<background>The 5450A Widget needs tuning on a <emph>monthly
basis</emph> to maintain optimum performance. The procedure
should take less than 15 minutes.</background>
<procedure>
<step time="1">Remove the tuning knob cover.</step>
<step time="5">Use the calibration tool to adjust the setting to
initial specifications.</step>
</procedure>
</taskmodule>
The markup can be passed through a rendering application to present the mechanics with a
formatted version:
The application that prepares the formatted version applies rules indicating how the elements of
the markup example are to appear. This example applies these rules:
•Put the heading element in a large, bold font.
•Generate the sentence, “This procedure requires advanced certification” from the value of the
skill attribute.
•Insert the italic header “Warning:” before the text of the warning element.
•Number the steps in the procedure.
Notice that the values of the time attributes do not appear in the formatted text. The rules that
drive a different application—a scheduling program, for instance—might use the time attribute
to allocate the mechanic’s time, for example. Or it might assemble the entire maintenance
procedure (possibly thousands of such maintenance cards), and add up the times for each step to
estimate the maintenance schedule.
Some tools address either the editing or the publishing application. FrameMaker is a single tool
that addresses both. Although you can use FrameMaker for either activity alone, its strengths
include the ability to create new structured documents (or edit existing ones) that are ready for
publishing without additional processing. This pairing allows a single set of format rules to
support both tasks. Thus, less effort is required to configure FrameMaker than to configure
separate editing and publishing tools.
•Providing page-layout information such as running footers and headers, margins, and so on—
the foundation of every WYSIWYG document.
•Establishing a correspondence between the markup and FrameMaker representations of a
document. For most elements, this correspondence is straightforward and automatic, but
FrameMaker allows for some variations. For example, terse markup names can be mapped into
longer, more descriptive FrameMaker names, and variant representations of tables, graphics,
and other entities can be chosen.
Each of these tasks requires planning and design before implementation, as well as testing
afterward.
Defining structure
A primary goal of the analysis phase is defining the structures that the end user will manipulate
within FrameMaker. The bulk of this effort is often the creation of a DTD. When the project begins
with an existing DTD, the DTD provides a foundation for the structure definition. FrameMaker, in
fact, can use the DTD directly. Nevertheless, a pre-existing DTD does not eliminate the need for
analysis and definition. As Eve Maler and Jeanne El Andaloussi explain in Developing SGML DTDs:
From Text to Model to Markup, many projects use several related DTDs. If the existing DTD is
intended for interchange, the editing environment can often be made more productive by
creating an editing DTD. Several examples from the widely known DocBook DTD used for
computer software and hardware documentation illustrate the types of changes that might be
made:
•Changing some element names, attribute names, or attribute values to reflect established
terminology within the organization.
For example, DocBook uses the generic identifier CiteTitle for cited titles. If authors are
accustomed to tagging such titles as Book, an application might continue to use the element
name Book during editing, but automatically convert Book to and from CiteTitle when
reading or writing the markup form of the document.
•Omitting unnecessary elements and attributes.
DocBook defines about 300 elements. Many organizations use only a small fraction of these.
There is no need to make the remainder available in an interactive application. FrameMaker
displays a catalog of the elements that are valid at a given point in a document. Removing
unnecessary elements from the authoring DTD means the catalog displays only the valid
elements that an organization might actually use in a particular context and avoids
overwhelming the user with a much larger set of valid DocBook elements.
•Providing alternative structures.
For example, DocBook provides separate element types—Sect1, Sect2, and so on—for
different levels of sections and subsections. Defining a single Section element to be used at
all levels (with software determining the context and applying an appropriate heading style)
simplifies the task of rearranging material and hence provides a better environment for authors
who may need to reorganize a document. Again, Sections can be automatically translated
to and from the appropriate Sect1, Sect2, or other DocBook section element.
•Simplifying complex structures that are not needed by an organization.
DocBook, for instance, provides a very rich structure for reporting error messages. If only a few
of the many possibilities will actually be used, you can edit the DTD to eliminate unnecessary
ones.
In addition to providing and editing the DTD, the analysis and definition of structure includes
planning for the use of tables and graphics. Many DTDs provide elements that are clearly intended
for such inherently visual objects. In other cases, however, such a representation of an element
results from the formatting rules of the application. Consider again, for instance, the repair
procedure on page 432. The formatted version did not display timing information for the
procedure steps. This alternative version formats the procedure in a three-column table, showing
the duration of each step:
S te p Duration Description
1 1 minute Remove the tuning knob cover.
2 5 minutes Use the calibration tool to adjust the setting to initial
specifications.
Thus, defining structure involves defining the family of DTDs to be used in the project as well as
deciding in general terms how the various elements will be used.
Testing
Although writing a DTD or a formatting specification does not use a traditional programming
language, it is essentially a programming process. Therefore, even when there is no need for FDK
clients, creating an markup application (for FrameMaker or any other tool) is a software
development effort and, as such, requires testing. Two types of tests are needed: realistic tests of
actual documents and tests of artificial documents constructed specifically to check as much of
the application as possible.
All necessary processes must be tested: formatting, markup import, and markup export. Test
documents must include FrameMaker documents to save as markup, and markup documents to
open in FrameMaker. Testing must also include any processing of legacy documents, including the
use of the FrameMaker conversion utility. Finally, once the application is used in production,
continued testing should incorporate some actual production documents.
Maintenance
While the application development effort decreases over time, some maintenance should always
be expected. In addition to needing bugs fixed, applications may be changed to accommodate
new formatting, to encompass additional documents, and to track updates to the DTD.
•Authors, editors, and graphic designers (production formatters) who will use the editing and
publishing application
•Subject-matter experts familiar with the content requirements of the documents to be
processed.
Developers include individuals with expertise in
•Markup
•FrameMaker
•XSLT
•Any other markup tools to be used
•Additional software tools, such as document management systems and database packages
Additional participants in the analysis may contribute significantly to the project definition even
if they will neither develop nor use the completed application. For example, the organization’s
Web advocate may be able to identify some requirements that do not affect the rest of the team.
The skill sets required within the implementation team include document design, markup
knowledge, setting up FrameMaker formatting templates, and setting up formatting rules that
control automatic application of the desired graphic design to structured documents. If the FDK
is used, programming skills are also needed. Of course, technical writing skills in documenting the
finished application are a valuable contribution to the completed effort.
The EDD formats the structure elements for readability: Different fields are clearly labeled, and
spacing, indentation, and different fonts emphasize the organization. You can enhance the
accessibility of information by grouping element definitions into sections and explaining them
with extensive comments. These characteristics are illustrated by the following fragment:
Structured templates
End users do not use EDDs directly. Instead, the definitions made in an EDD are extracted and
stored in a template—that is, a FrameMaker document used as a starting point for creating other
documents. Developers provide end users with a template that incorporates the structure and
format rules from a particular EDD, as well as page layout information and formatting catalogs
that define paragraph, character, cross-reference, and table styles. It may also contain sample text
and usage instructions.
In some applications, information can be formatted in several ways. For example, the same text
may need to be formatted for books with two page sizes. FrameMaker can accommodate such
requirements. If an EDD’s format rules refer to paragraph and character styles in the template’s
catalogs, new catalogs can be imported from another template to change the document’s
appearance. New page layouts, table styles, and cross-reference styles can also be imported. If the
format rules incorporate specific formatting parameters, the appearance can be changed by
importing a new EDD with different format rules.
Since both the FrameMaker rendition and the markup text file include content and element
structure, data can move between the two forms automatically. The user interface is
straightforward. The FrameMaker File > Open command recognizes XML and SGML documents.
When a user opens one, FrameMaker automatically converts the document instance to a
structured WYSIWYG document and applies the format rules of the appropriate markup
application. To write a structured WYSIWYG document to XML the user simply selects the File >
Save, or File > Save As XML... command. For SGML, the user specifies SGML when executing the
File > Save As... command.
Just as the form of a structured document parallels the form of a markup document instance, an
EDD parallels a DTD or Schema. FrameMaker can also move definitions of possible structures
between the two forms. Thus, if a new project is based on an existing XML DTD, FrameMaker can
automatically create an EDD from the DTD. For example, given DTD declarations such as
Since there is no formatting information in the DTD, no format rules are included in the
automatically generated EDD. You can manually edit this information into the EDD, or import a
CSS style sheet into the EDD. You only need to do this once, even if the DTD is revised.
It is common for a DTD to undergo several revisions during its life cycle. When you receive an
updated DTD, FrameMaker can automatically update an existing EDD to reflect the revision, and
the update process preserves existing formatting information and comments in the EDD. The
update incorporates changes to content models and attribute definitions, inserts new element
types and removes discarded ones, then generates a short report summarizing the changes so
that the application developer can review them.
If a project is not founded on an established DTD or Schema, the application developer can start
implementation by creating an EDD. Once the EDD is finished, FrameMaker can automatically
create the corresponding DTD.
Read/Write
Rules
Default
Processing
XSLT Structure
Transformation API
DTD. These conversions are shaded in the following diagrams, which also show the FrameMaker
commands that invoke them and their interaction with other data files.
Open DTD...
RWR
RWR
Save As DTD...
EDD
Template
RWR
Open SGML
SGML SGML FM
Document Document
Round-trip
Open DTD...
RWR
RWR
Save As DTD...
Generate CSS2...
EDD RWR CSS
RWR
Import CSS Styles...
Template
XSLT RWR
Open XML
XML XML FM
Document Document
Round-trip
Because FrameMaker automatically reads the structapps.fm file, writers and editors do not
need to know about the structure application file. To import or export markup documents,
however, they may need to know the names of available applications—but even this information
can be stored in a FrameMaker template or automatically selected from the document type name
of an markup document. For example, given the preceding structure application file example,
when reading an SGML document that begins:
<!DOCTYPE taskmodule SYSTEM "task.dtd">
FrameMaker uses the Maintenance application. Because that application specifies read/write rules,
the indicated read/write rules control the import. Furthermore, the Maintenance application is
stored in the resulting structured document so that the same read/write rules are used if the
document is later exported back to markup.
The information in an application definition can include:
•One or more document type names that trigger use of the application on import.
•The name of the file containing the DTD to be used for export. This field is not needed for
applications that only require import, since imported markup documents always include a
document type declaration. When it does appear, the “DTD for export” field actually contains
the name of a file containing DTD declarations (sometimes called an external DTD subset)
suitable for use in document type declarations such as the one shown in the preceding
example for the Maintenance application.
•Character encoding.
•The handling of conditional text for export to XML.
•Files containing external entities (identified by entity name or public identifier).
•An entity catalog.
•Search paths for subfiles of read/write rules and external entities.
•External cross reference handling for XML.
Legacy documents
In general, the conversion of unstructured documents to structured documents (or to markup
documents) cannot be completely automated. FrameMaker offers a utility that adds structure to
unstructured FrameMaker documents. This is done by mapping paragraph and character styles as
well as other objects—such as footnotes, cross-references, markers, and tables—to elements.
Some manual polishing of the resulting documents is expected; the amount of editing depends
on the discipline with which formatting catalogs were used in the original and on whether a
unique set of elements corresponds to each formatting tag. Since FrameMaker can read many
common word processing formats, this utility can be used to structure word processor documents
as well. Once any errors in the resulting structured document have been repaired, it can be
exported to markup. Thus, FrameMaker provides a path for converting word processor documents
to markup.
The rules for mapping between styles and elements are specified in a conversion table.
Techniques for defining the mapping are provided in Developer Reference, Chapter 4, Conversion
Tables for Adding Structure to Documents
Application delivery
Once an application has been completed, it must be delivered to the end users. The developer
can either install the completed application on the end users’ system or network, or provide
instructions for doing so. At a minimum, end users need copies of all templates and FDK clients.
If end users will be structuring existing unstructured documents, they will also need copies of all
conversion tables used. Finally, if end users will be exporting or importing markup documents,
their structure application files must be modified for the new application. They need access to the
read/write rules, entity catalog, DTD/Schema for export, XSLT style sheets, and (for SGML structure
applications only) an SGML declaration.
on elements that contain text and their immediate ancestors, such as elements for list items,
notes, cautions, emphasized phrases, and cited titles.
6.After providing format rules for a few elements, test them by using the File > Import > Element
Definitions command to import the element definitions from the EDD into the sample
document. This command reports any formatting catalog entries mentioned in format rules
but not defined in the sample FrameMaker document. Define all reported formats and glance
through the sample document to verify that the formatted elements appear as intended.
You can then return to the EDD, correcting any errors in the format rules and adding some
more before testing them again, until the sample document is completely formatted. At that
point you might want to test some other documents. After creating a base for further
development, continue systematically through the DTD, making and testing context-sensitive
format rules for all necessary elements.
7.You might need to add more read/write rules. If you change additional element tags, the original
names must be replaced by the new versions throughout the EDD, in the definitions of the
changed elements as well as in definitions that refer to those elements. To update the names
in the EDD, use the StructureTools > Import DTD command, which reprocesses the DTD
according to the current read/write rules and updates the existing EDD. It writes a report
listing the changes made.
8.To create a template from the sample document, you can delete all content and save the result.
9.Use the template to test the editing environment by adding automatic insertion rules to the
EDD, specifying, for example, that when the end user inserts a List element, FrameMaker
should automatically insert an Item element within it. Consider whether an FDK client can
provide input accelerators, such as automating frequent sequences of editing steps. You
might also want to customize the FrameMaker menus for end users, perhaps removing
developer-oriented commands or (to prevent the end user from overriding automatic format
rules) removing formatting commands.
10.For markup import, add the template to the application definition in the structure application
file, and add read/write rules for special characters and other entities. Once again, open the
markup version of the sample document, test the result, and modify the application until the
results are correct.
11.If read/write rules are insufficient to import any elements, use the structure API to develop a
client with the requisite functionality.
12.If markup export is also required, test it and add other read/write rules or structure API
functions, if necessary.
13.Once formatting, import, export, and editing functions have been tested, deliver the
completed application, along with documentation, to the end user.
1.For a specific XML document, you can include the path of the schema file in the XML using
attributes - noNamespaceSchemaLocation or schemaLocation depending on
whether your schema includes a target namespace or not.
2.To specify a Schema file for use in exporting XML, modify the structapps.fm file. Use the
Schema element as part of the XMLApplication to provide the Schema file path for
export.
3.Open the XML in Frame using a structured application. Edit it.
4.Save the XML using a structured application. The Schema element in the structapps.fm file is
output in the file and validation is performed against it.
In this workflow, a DTD is generated automatically as an intermediary file from the Schema given
in the XML document, and you do not modify it. However, you can also use a Schema file to
generate an EDD directly, or you can modify the DTD and reference it from the XML document.
When an XML document references both a Schema and a DTD, FrameMaker imports it using the
DTD, although it still validates against the Schema.
unstructured document. This command puts a row in the table for each type of FrameMaker
object and format tag used in the sample document. The initial conversion table might
appear as follows:
2.Edit the conversion table, changing entries in the second column, adding entries in the third
column, and adding new rows for higher level structures.
3.Use the conversion table to add structure to the sample document, ignoring the lack of
formatting in the resulting structured document but correcting as many structural errors as
possible by editing the conversion table and reapplying it.
4.With the StructureTools > Export Element Catalog as EDD command, extract an EDD that has
an element definition for each element type that appears in the sample document. Although
these element definitions define the content of the elements very generically—each is
allowed to contain text as well as any defined element—the EDD provides a skeleton that you
can further develop.
5.The exported EDD lists the element definitions alphabetically, according to their tags. You can
rearrange them into a logical order if desired—easily moving them around using drag-and-
drop in the Structure View—and then replace the content rules with more restrictive ones and
add format rules.
6.The sample document (and other automatically structured documents) can be reformatted by
using the File > Import > Element Definitions command from the EDD into the generated
structured document
7.Continue to finish the application, as in the previous scenario. However, since page layouts and
formatting catalogs were defined in the original unstructured document, the template
development effort does not need to be repeated.
454
inclusions for 181 element types in 160, 165
inserted automatically 183–184 errors when importing 168
Doc Comment marker for containers, tables, and footnotes 157–162
exporting 317 for object elements 163–166
storing comments 325 for Rubi groups 162–163
DOC PI markers for storing entities and PIs 318 guidelines for writing 157
document type declarations (DTDs) importing into a template 168
comparison with EDDs 89 object format rules in 241–251
creating from an EDD 170 organizing in sections 154
EDD content rules and 182 structure rules in 173–188
EDD object format rules and 241 text format rules in 205–239
EDD text format rules and 205 element tags
errors when translating to an EDD 143 correspondence to markup languages 299
external DTD subsets 89, 121, 141 in element definitions 156
saving an EDD as 142 in read/write rules 280
SGML declarations and 171 renaming for markup languages 302
updating an EDD from 143 element types
See also markup language, translation comparison with markup languages 91
documentation, for applications 123 list of possible 160, 165
documents, comparison with markup languages 94 elements
DTD. See document type declarations comparison with markup languages 90–??
discarding when translating to or from markup
languages 309
E elements, default translation
EDD. See element definition documents element tags 299
Element Catalogs general rules and model groups 296
creating in a template 167–169 inclusions and exclusions 301
elements in an EDD catalog 145–153 line breaks and record ends 301
exporting to an EDD 144 elements, modifying translation
element definition documents (EDDs) 139–171 converting markup language elements to footnotes
adding comments to 154 304
comparison with DTDs 89 converting markup language elements to Rubi groups
creating from a DTD 142 305
creating new 144 renaming elements 302
errors when translating to a DTD 171 retaining content but not structure 307
exporting an Element Catalog to 144 retaining structure but not content 307
high-level elements in 145 suppressing display of content 308
list of elements in 147–153 else clauses, in format rules 254
overview of developing 110–113, 140 else/if clauses, in format rules 254
samples to review 172 EMPTY keyword, in general rules 177
saving as a DTD 170 entities 93
setting a structure application in 154 entities, default translation
shortcuts for working in 166 external data entities 322
updating from a DTD 143 external text entities 323
element definitions for marking documents in book 420
attribute definitions in 189–203 how used for variables 402
basic steps for writing 156–166 internal CDATA entities in SGML 320
comments in 160, 164 internal SDATA entities in SGML 321
comparison with markup languages 92 internal text entities 319
creating formats when importing 153 on export to markup languages 316
debugging 168 on import from markup languages 319–324
element tags in 156 parameter entities 323
456
exporting elements 381 when to use 234
omitting elements and attributes 385 with autonumbers 229
omitting graphic properties 384 level rules (for formatting) 258–260
renaming attributes for properties 383 ancestor tags in 259
renaming elements 379 counts using current element 259
representing structure of equations 383 order of clauses in 258
specifying data content notation 386 limits on formatting values 236
specifying entity names 390 line breaks and SGML record ends 301
log files
generating 135
H hypertext links in 136
hidden and read-only attributes messages in 135
specifying in definitions 194 See also errors
HTML
conversion macros 129
elements mapped from FrameMaker elements 128 M
export 124 marker objects
mapping for export 127 in Schema 410
markers
comparison with SGML 107
I defining elements for 163–166
IDReference attributes list of predefined types 246
comparison with markup languages 98 object format rules for 246
defining 199 markers, default translation
using for cross-references 196 on export to markup languages 408
if clauses, in format rules 254 on import from markup languages 409
imported graphic files See graphics markers, modifying translation
importing element definitions 168 discarding nonelement markers 411
importing from markup languages. See markup languages, identifying markers with attributes 410
translation translating elements as markers 409
importing XML document writing marker text as content 410
storing comments 325 markup languages
INCLUDE keyword, in rules documents 280 comparison with FrameMaker 23, 89
inclusions features not in FrameMaker 99
correspondence to SGML 301 markup languages, translation to and from
in element definitions 181 books 417–423
when used with exclusions 181 cross-references 393–??
indentation settings 218 EDD content rules 182
inheritance of formatting information 207–211 elements and attributes 295–314
in tables or footnotes 210 entities and PIs 315–337
within books 211 example of 269–273
initial structure pattern, for Rubi groups 188 graphics and equations 367–392
initial structure pattern, for tables 185–186 markers 407–412
overview of 267–273
Rubi groups 305–306
K tables 339–365
keyboard shortcuts for an EDD 166 UniqueID values 199
variables 401–406
See also read/write rules and specific element types
L {middle} sibling indicator 255
{last} sibling indicator 255
last format rules 227–229
how applied 228
458
footnote objects 410 how applied 230
graphic objects 380 when to use 234
marker objects 410 system variables
table objects 344, 396 defining elements for 163–166
SDATA entities finding errors in definitions of 251
default translation of internal 321 list of predefined variables 249
translating as characters 328 object format rules for 249
translating as reference elements 331 system variables, default translation
translating as text insets 330 entities for nonelement variables 402
translating as variables 328 on export to markup languages 402
translating entity references 327 on import from markup languages 403
SGML system variables, modifying translation
features not in FrameMaker 107 discarding variables 406
model compared to FrameMaker model 107 renaming or changing entity types 403
optional unsupported features 108 translating as variable elements 405
SGML declarations 122 translating SGML SDATA entities 328
for a DTD created from an EDD 171 translating to markup language text 405
SGML parser
applying to a DTD 171
sibling indicators T
in format rules 255 tab stop settings 219
used with TEXT keyword 256 Table Cell properties (text formatting) 225
spacing settings table objects
for lines 218 format rules 243
for paragraphs 219 in Schema 344, 396
for words 224 structure rules 173
line spacing and font sizes 219 See also tables
string attributes 192 tables
structure API clients comparison with markup languages 97
uses for 268 default general rules for 179
structure applications default initial structure for 186
location of files in 131 defining elements for 157–162
overview of 85–88 finding errors in formats of 250
pieces of 121–123 formatting cells in 225
process of developing 110–121 general rules for 175–180, 244
scenarios for 83 inheritance of text formats in 210
setting in an EDD 154 initial structure pattern for 185–186
structure rules 173–188 object format rules for 243
debugging 188 paragraph formats for 212
overview of 174 restrictions on general rules 178
Structure View tables, default translation
attributes in 190 on export to markup languages 343
cross-references in 197 on import from markup languages 340
invalid contents in 174 tables, modifying translation
stylesheets creating parts without content 357
XSL 292, 425 creating tables inside tables 364
subrules, for format rules 260 creating vertical straddles 360–362
suffix rules 229–234 exporting widths proportionally 359
attributes in 233 formatting as boxed paragraphs 363
defining for paragraphs only 231 formatting with CALS attributes 351
defining for ranges and paragraphs 232 identifying colspecs and spanspecs 352
defining for text ranges only 230 omitting representation of parts 354
U
UniqueID attributes
comparison with markup languages 98
460
LEGAL NOTICES
Legal notices
For legal notices, visit the Legal Notices page.