This manual is for anybody who develops structured FrameMaker templates and XML or
SGML applications. It is not for end users who author structured documents that use such
templates and applications.
XML and SGML
FrameMaker can read and write XML (Extensible Markup Language) or SGML (Standard
Generalized Markup Language) documents. XML and SGML are two types of document
markup languages, and FrameMaker handles these markup languages in similar ways.
However there are differences between the two, and this manual covers these differences
whenever necessary.
When discussing the similarities between them, this manual refers to XML and SGML data
as markup data or markup documents. Otherwise the manual refers to XML and SGML
specifically to draw attention to the differences between these markup languages.
Developing structured FrameMaker templates
End users of FrameMaker can read, edit, format, and write structured documents—the
structure is represented by a hierarchical tree of elem ents. Each structured document is
based on a template that contains a catalog of element definitions. Each element definition
can describe the valid contexts for an element instance, and the formatting of element
instances in various contexts.
To support these end users, you create the catalog and accompanying structured template.
Developing XML and SGML applications
When the software reads mark up data, FrameMaker displays th e data as a formatted,
structured document. When the software writes a structured FrameMaker document, the
software can save the docume nt as XML or SGML.
For the end user, this process of translation between FrameMaker documents and markup
data is transparent and automatic. However, for most XML or SGML document types the
translation requires an XML or SGML application to manage the translation. You develop
this application to correspond with specific doc ument types. When your end user opens a
markup document with a matching document type, FrameMaker invokes the appropriate
structure application. If there is no match for a document type, the user can choose the
application to use, or open the markup document with no structure application. A structure
application primarily consists of:
Structure Application Developer’s Guidexv
• A structured template
• Read/Write rules (described in this manual)
• An XML and SGML API client (if n ecessary) developed with the Frame Develop er’s Kit
(FDK)
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 a nd syntax, including how to work with a document type
declaration
• 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:
• 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.
Using FrameMaker documentation
FrameMaker comes with a complete set of end-user and developer documentation with
which you should be familiar. If you use the Frame Developer’s Kit in creating your structure
application, you’ll also need to be familiar with the FDK documentation set.
Using this manual
This manual is divided into three major parts and a series of appendixes. If you’re creating
a structure application, you’ll find information you need in all three parts. If, however, you’re
not working with markup data but are creating a structured template, you’ll need only Part II.
The parts are as follows:
• Part I, “Developing a FrameMaker structure application”
Part I is for developers of XML or SGML structure applications. This section contains
- introductory information
- An overview of the steps in creating a structure application
Before You Beginxvi
- A comparison of FrameMaker concepts and XML and SGML
- Details of assembling the pieces of an application into a whole
• Part II, “Working with an EDD”
Part II is for developers of a FrameMaker structured template. It contains information on
how you use an element definition document (EDD) to define elements and determine
their formatting for your documents . You use this part in conjunction with chapters in the
FrameMaker user’s manual that describe other aspects of template creation.
• Part III, “Translating between markup data and FrameMaker”
Part III is for developers of structure applications. FrameMaker’s default translation
between markup documents and FrameMaker documents follows a model. This part
describes the model and the rules you use to modify the default translation.
• Part III, “Translating between markup data and FrameMaker”
Part IV is for developers of XML applications. FrameMaker’s default translation between
XML documents and FrameMaker documents follows a model. This part describes the
model and the rules you use to modify the default translation.
• Appendixes
The appendixes include information such as how to add structure to unstructured
FrameMaker documents and how to work with ISO public entities. There is also a
glossary of terms.
If you’re creating an XML or SGML application, we encourage you to read the first three
chapters of Part I before reading any of the rest of the manual. For your purposes, these
chapters are a prerequisite to the rest of the manual.
Each of the parts of this manual begins a short introduction in which you can find
information about specific chapters in that part.
Using other FrameMaker documentation
The FrameMaker User Guide makes up the primary end-user documentation for this
product. It explains how to use the FrameMaker authoring environment for both structured
and unstructured documents. It also explains how to create templates for your documents.
In creating a structured template, you can refer to this manual for information on how your
end user interacts with the product and how to create a formatted template.
Using FDK manuals
If you create an XML and SGML API client for your XML or SGML application, you’ll need
to be familiar with the FDK. FDK documentation is written for developers with C
programming experience.
• FDK Programmer’s Guide is your manual for understa nding FDK basics. This manual
describes how to use the FDK to enhance the functionality of FrameMaker and describes
Structure Application Developer’s Guidexvii
how to use the FDK to work with structured documents. To make advanced modifications
to the software’s default transla tion behavior, refer to the Structur e Import/Export API Programmer’s Guide.)
• FDK Programmer’s Reference is a reference for the functions and objects described in
the FDK Programmer’s Guide.
• Structure Import/Export API Programmer’s Guide explains how to use the FDK to make
advanced modifications to the software’s default behavior for translation between markup
documents and FrameMaker documents. This manual contains both descriptive and
reference information.
For information on other FDK manuals, see “Using Frame Developer Tools” in the FDK
Programmer’s Guide.
Before You Beginxviii
Part I Developing a
FrameMaker structure
application
Part I provides basic information for developing SGML applications, manual including:
• Chapter 2, “Structure Application Basics”
Describes situations that require a structure application. Also contains a high-level
description of application creatio n.
• Chapter 3, “A General Comparison of Markup and FrameMaker Documents”
Compares relevant SGML and FrameMaker concepts. Yo u should read this chap ter even
if you are already familiar with both SGML 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 6, “Creating a Structure Application”
Describes typical application creation workflow. Also discusses t he types of files use d in
your final SGML application.
• Chapter 7, “Working with Special Files”
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.
Structure Application Developer’s Guide1
Developing a FrameMaker structure application2
1
What’s New in FrameMaker1
This chapter describes new additions to FrameMaker that pertain to the development and
use of structured applications.
What’s new in FrameMaker 7.1
FrameMaker 7.1 introduces several changes in import and export of XML documents.
Important: None of these changes affect import or export of SGML documents.
The following sections briefly describe the new FrameMaker 7.1 functionality and provide
links to more complete descriptions.
Conditional text
FrameMaker 7.0 exported shown conditional text with no indication in the resulting XML that
the content was conditional. It never exported hidden conditional text. FrameMaker 7.1
allows export of both shown and hidden conditional text. Furthermore, it optionally exports
processing instructions that define condition settings and identify conditional material. It
interprets these processing instructions when importing an XML document and thus
supports round-tripping of conditional text. See Chapter 23, “Translating Conditional Text.”
External cross-references
FrameMaker 7.0 used XML elemen ts to export internal cross-refere n c es (th os e in w hic h th e
cross-reference source is in the same FrameMaker document as the cross-reference itself).
When it exported a book, it a lso generated XML elements for cross- references from one
book component to another component of the same book. It converted all other external
cross-references to text.
FrameMaker 7.1 exports all cross-references as XML elements. It uses a new srcfile
attribute to identify the source file of external cross-references. You can choose whether the
FrameMaker or XML form of the source file should be named. On import, FrameMaker
reads the srcfile attribute to create external cross-references. See Chapter 20,
“Translating Cross-References.”
Preserving the XML extension
When FrameMaker 7.0 opened an XML document, it created a new FrameMaker document
without preserving the fact that the document originated as XML. It changed the file
extension to .fm and used this modified filename to label the resulting document window.
Structure Application Developer’s Guide3
1
What’s new in FrameMaker 7.0
FrameMaker 7.1 preserves the original file name. If you save an imported XML document,
the document is saved as XML rather than as a FrameMaker document. Furthermore,
FrameMaker locks an open XML document so that no other user can change it, with
FrameMaker or with another application, until it is closed. See “Opening XML documents”
on page 207 for more details.
Priority of variable definitions
FrameMaker imports some XML entity references as user variables. If the user variable is
not defined in the import tem plate, Fram eMaker defines it, using the entity definition (text in
quotation marks) in the XML entit y declaration as the FrameMaker variable definition.
FrameMaker 7.0 and FrameMaker 7.1 differ in their treatment of entity references when t he
corresponding variable is pred efined in the template. FrameMake r 7.0 gave priority to the
definition in the template. If the definition in the template differ ed from that in the XML
document, it used the definition in the template. FrameMaker 7.1 gives priority to the
definition in the XML entity declaration. FrameMaker 7.1 therefore supports round-tripping
of such entity declarations. See “Internal text entities” on page 251
What’s new in FrameMaker 7.0
FrameMaker 7.0 introduces full support for the import and export of XML markup. As a
result, many things have changed. Most notably, FrameMaker now supports the import of
XML with UNICODE text. You can edit the impor ted documents, and when you save th em
as XML again FrameMaker retains the font encoding.
.
The following sections briefly describe the changes in FrameMaker, and provide links to the
parts of this manual that describe these changes in detail.
Path and filename changes
Earlier versions of FrameMaker included many path and filenames that included the letters
“SGML” to identify them as spec ific to FrameMaker+SGML. With version 7.0 structured
FrameMaker documents can be saved as SGML or XML—many of these path and
filenames have changed. Also, the structure of the FrameMaker installation is slightly
changed to separate files specific to SGML and XML into separate branches. Among these
changes:
• What used to be the sgml branch of the installation is now found underneath the
structure directory—there you can find $installdir/structure/sgml and
$installdir/structure/xml which contain separate branches for files that pertain to
SGML and XML
• The file sgmlapps.fm is renamed to structapps.fm—you can find this file in
$installdir/structure/structlapps.fm
What’s New in FrameMaker4
1
What’s new in FrameMaker 7.0
Application development
Because of the differences between SGML and XML, you must specify which structure
applications are for SGML and which are for XML. For XM L structure applications you can
specify how an application manages:
• CSS files
• Namespaces
• Character encoding and Unicod e support in XML
For more information, see Chapter 7, “Working with Special Files.”
Read/write rules
Because XML is case-sensitive, any references to XML keywords in your read/write rules
must match the case of thes e keywords. Generally, these key words are in uppercase
letters.
The names of the following read/write rules have changed:
From:To:
fmsgml versionfm version
write sgml documentwrite structured document
write sgml document instance onlywrite structured document instanc e only
Namespaces
FrameMaker 7.0 supports XML namespace declarations. For more information, see
“Namespace declaration” on page 25
CSS support
FrameMaker does not use CSS data when importing XML, but it does retain the CSS
specification in an XML document on export. You can also generate a CSS from the
formatting information that is stored in an EDD. See Chapter 15, “Saving EDD Formatting
Information as a CSS Stylesheet.”
Exporting variables to markup
FrameMaker exports non-element variables as entities. Depending on the variable, some of
these entities can be SDATA or CDATA. XML doesn’t support SDATA or CDATA entities—
you have two options for handling such non-element variables:
• By default, FrameMaker writes the variables out as text
• You can use read/write rules to map the variables to empty elements
For variables that are elements, FrameMak er exports them as empty elements in markup.
Structure Application Developer’s Guide5
1
What’s new in FrameMaker 7.0
For more information, see Chapter 21, “Translating Variables and System Variable
Elements.”
New starter kits
FrameMaker 7.0 includes a new starter kit for XHTML, and an updated kit for DocBook 4.1
(SGML) and 4.1.2 (XML). For more information, see the starter kit manuals in the online
manuals directory.
What’s New in FrameMaker6
2
Structure Application Basics2
This chapter provides an introduction to structure application development using
FrameMaker. The chapter examines some of the reasons you might be using markup data
and FrameMaker together and explains how those reasons affect the structure application
you develop. The chapter also provides high-level information about cr eating that
application.
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 II, “Working with an EDD.”
If your end users need to read or write markup documents, you will probably need to
develop a structure application to mo dify the default translation between mark up data and
FrameMaker documents. In that c ase, this entire manual is of use to you. The rest of Part
I provides general information on creating a structure application. Part III, “Translating
between markup data and FrameM aker ,” 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.
Structure application scenarios
The specific features of your structure application will largely depend on how your
organization intends to use it.
Translating in one or two directions?
You can write structure applications that translate documents in one direction—from XML
or SGML to FrameMaker or from FrameMaker to XML or SGML. Or your application can
translate in both directions, enabling in formation to make round tr ips between markup data
and FrameMaker.
If your end users only translate the data in one direction, you can limit your structure
application to only manage the translation in that direction. One-direction translations are:
• Reading markup data in to FrameMaker—the structure applic ation only needs to import
specific doctypes into FrameMaker
• Writing FrameMaker documents as markup data—the structure application only needs to
export FrameMaker documents as XML or SGML of a specific doctype
Structure Application Developer’s Guide7
2
Structure application scenarios
For example, your company may have a large SGML 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 SGML. In this case, end users
manipulate the catalog document in FrameMaker, but not the source SGML database.
Because of this, you set up an application to translate from SGML 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.
Can you simplify when translating in only one direction?
If your application only needs to translate in one direction, then you might be able to simplify
some of the information you present. For instance, if your end users have existing
FrameMaker documents to deliver in markup, they developed documents using the full
power of FrameMaker. They may well have used such FrameMaker features as markers to
facilitate document creation. But some of these features may not be relevant in markup
data, so you can choose to omit them from the markup document. If you won’t be reimporting the markup data back into FrameMaker, the resultant loss of information is not
important. Therefore, you don’t have to retain the use of those features in your structure
application.
Do you have an existing DTD or EDD?
Another factor influencing the design of your application is the degree to which the
document structure has already been defined for the markup data and the FrameMaker
template. Is your starting point an established EDD or DTD—for instance, one of the
Department of Defense CALS DTDs? Will you be provided with both an established EDD
and an existing body of documents that use that EDD? Or has neither definition document
as yet been written?
It is common to start application development with a DTD. In that case, your structure
application must also address the issues of translating the DTD to an EDD. It is also
possible that you begin with an existing EDD, and must translate the EDD into a DTD.
For example, assume your end users already have a library of documents based on a
particular DTD. In that case, you’ll be less inclined to make changes to the DTD that require
Structure Application Basics8
2
Structure application development
modifying those documents. If you start without a model on either side, however, you have
the freedom to design the EDD and the DTD with its counterpart in mind. If you have this
freedom, the application desig n process may be easier.
Structure application development
Markup data and structure in FrameMaker have many similarities. To describe the
hierarchical nature of docume nts, b oth use sp ecial methods to define the elements that can
occur in a document instance, and the relationships among those elements. In markup,
these elements are defined in a DTD, and in FrameMaker they are defined in an EDD.
Within particular document instances, both use descriptive tags to identify each instance of
a structural element. The tags in the document content correlate to the element definitions
found in the DTD or the EDD, as shown in the following illustration. The top of the illustration
shows pages of SGML and Fram eMaker documents, while the bottom sh ows a DTD and
EDD, respectively. The highlighted portion of the SGML document corresponds to the
highlighted definition for <list> in the corresponding DTD. The FrameMaker page and
EDD illustrate a similar correspondence.
Structure Application Developer’s Guide9
2
Structure application development
An SGML document instance
and its DTD
<chapter><head>Summary of
Transportation 2000 Plan Elements
</head>
<section><head>Highway System</head>
<para>
A base network of roads for people and
goods movement, designed to operate at
maximum efficiency during off-peak and
near capacity in peak hours. Elements
include freeways, expressways and major
arterials. Current projects include:
</para>
<list type = “bullet”><item>Completion
of Measure “A” program of Routes 101,
85, and 237</item>
<item>Emphasis on Commuter Lanes and
bottleneck improvements including new
and upgraded interchanges</item>
<item>Capacity improvements in 101 and
Fremont/South Bay Corridors</item>
<item>Operational improvements
including signal synchronization and
freeway surveillance</item>
</list></section></chapter>
<!ELEMENT chapter - - (head, section+) >
<!ELEMENT head - - (#PCDATA) >
<!ELEMENT section - -
(head, (para | list)*) >
<!ELEMENT para - - (#PCDATA) >
<!ELEMENT list - - (item+) >
<!ATTLIST list
type (bullet | number) bullet >
<!ELEMENT item - - (#PCDATA) >
A FrameMaker document and its
EDD
Summary of Transportation 2000
Plan Elements
Highway System
A base network of roads for people and
goods movement, designed to operate at
maximum efficiency during off-peak and
near capacity in peak hours. Elements
include freeways, expressways and
major arterials. Current projects include:
• Completion of Measure "A" program
for Routes 101, 85, and 237
• Emphasis on Commuter Lanes and
bottleneck improvements including
new and upgraded interchanges
• Capacity improvements in 101 and
Fremont/South Bay Corridors
• Operational improvements including
signal synchronization and freeway
surveillance
Element (Container): Para
General rule: <TEXT>
. . .
Element (Container): List
General rule: Item+
Attribute list:
1. Name: Type Choice Optional
Choices: Bullet, Numbe r
Default: Bullet
Element (Container): Item
General rule: <TEXT>
Text format rules
1. In all contexts.
Basic properties
Indents
First indent: 0.0”
Move left indent by: 0.16667”
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 togeth er, 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.
Structure Application Basics10
2
Structure application development
The starting point: an EDD or DTD
Your end users need a starting point that describe s the structur e of documents they’ll create
or edit. You provide this starting point either with a DTD or a FrameMa ker EDD.
If you start with a DTD, FrameMaker can create portions of a corresponding EDD for you.
Similarly, if you start with an EDD, FrameMaker can create a DTD for you. If a starting point
has not yet been established, you can create your own DTD or EDD. In this situation, we
recommend you to start by using FrameMaker’s tools for creating an EDD (describ ed in Part
II of this manual) and then create a DTD from that EDD.
Translation between DTDs and EDDs
FrameMaker can automatically translate a DTD or EDD. If you start with a DTD, the
software creates a default version of the corresponding EDD. Similarly, if you start with an
EDD, FrameMaker creates a default version of the DTD.
Once your application is complete, your end users use standard commands to save
individual FrameMaker documents as markup documents or to open individual markup
documents in FrameMaker. In either case, the structure application works transparently with
FrameMaker, making these automatic translations possible.
Formatting information in FrameMaker
You create a structured template to provide appropriate formatting for your document s.
Properly speaking, a DTD does not provide any formatting information. With XML,
formatting information is provided via CSS or XSL. When reading XML, FrameMaker does
not use any of this formatting information.
When reading markup data, FrameMaker combines any formatting that is defined in the
document template with any formatting rules that are specified in the EDD. To vary the
formatting of your documents, you may create more than one structured template for the
same DTD. For example, your end users can use the same markup data for different
purposes, such as a fully designed cata log and a brief parts list. They may wa nt the same
data formatted differently in these two situations.
Changing the default translation
The structure of markup data varies widely, and that can affect the way it maps to
FrameMaker document objects. As a result, much of your job in creati ng a structure
application is to change the default translation FrameMaker uses. You do so by providing
information the software needs to recognize and process particular constructs. If
FrameMaker automatically translates all the components of a document just as you want,
you don’t need to provide this extra information.
One of the differences betw een markup data and FrameM aker is that has explicit
representations for items such as tables or graphics. With XML or SGML, an individual DTD
defines a arbitrary representations for tables and graphics. For this reason, the defa ult
translation in FrameMaker ass ume certain DTD representations of th ese items. For
Structure Application Developer’s Guide11
2
Structure application development
example, by default FrameMaker assumes a CALS model for tables. These assumptions
may or may not match your actual DTD. If they don’t match, you need to develop an
application that modifies the default translation accordingly.
How you modify the translation
To modify how FrameMaker translates documents, you start by using special read/write
rules. In many cases these rules are sufficient to successfully translate a given doctype. A
significant part of your effort in creating a structure application consists of specifying these
rules.
You specify read/write rules in a special rules document. Most rules are relevant to all
import or export functions, but a small number apply only to some. For example, there is a
rule to rename an element on import and export. There is also a rule to tell the software
how to treat FrameMaker non-element markers on export, but this rule doesn’t apply to
import or to creation of a DTD.
In some situations the representation you want in yo ur DTD and your EDD may be radically
different from what FrameMaker does by default. If so, rules might not be adequate to
correctly translate your docu ments. For example, the FrameMaker model for tables
assumes that a table is described in row-major order. But if your DTD describes tables in
column-major order, then the FrameMaker read/write rules won’t be able to translate
between the markup data and FrameMaker representations. In other situations, your XML
or SGML document may contain processing instructions that need to be interpreted but are
unknown to FrameMaker. In such situations, you can customize FrameMaker via the FDK.
The FDK allows you to modify FrameMaker’s import and export of individual markup and
FrameMaker documents. You cannot use it to modify the creation of an EDD or a DTD.
What your end users do
Once you’ve created a structur e application, your end users use th at application to open
markup documents in FrameMaker and to save FrameMaker documents as markup data.
For this purpose, they’ll work in a FrameMaker environment that includes your structure
application. Depending on your application, the fact that files are stored as markup or as
FrameMaker documents can be invisible to your end users. For example, the standard
Open command opens either an XML or a FrameMaker document.
Structure Application Basics12
Loading...
+ 558 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.