X hits on this document

PDF document

Typesetting SGML Documents Using TjjX - page 2 / 6

15 views

0 shares

0 downloads

0 comments

2 / 6

Andrew E. Dobrowolski

still in the design stages. It is not expected to be- come an international standard until at least 1993. For this reason the output specification section of the GALS standards proposed the Formatted Out- put Specification Instance (FOSI) as the means of output specification interchange.

SGML and FOSI Structure: An Overview

All SGML documents must conform to certain rules that are defined partially by the standard and partially by a prolog to the document; this prolog is called the document type definition (DTD). The DTD defines the "elements" of a document; in a

made between these various contexts, at least for the purpose of formatting the document. But since the DTD also restricts the context in which any element may appear, the task of defining the style of every element in every one of its possible contexts is fairly well defined. Thus, a FOSI will not define the formatted output style of a document element but of an element in context (or e-i-c).

Many industries have developed DTDs that de-

fine the elements (tag sets)

documents.

Before

SGML

used to mark up their becomes a universally

accepted

standard

of

document

interchange,

one

of

SGML's

conlpanion

standards

for

output

specifica-

tion

must

be

fully

implemented.

TEX

could

be

the

engine

in the

implementation, the means of produc-

document

instance,

these

are marked

off by start

tags and

end tags.

For

example. a

hypothetical

ing

The

standardized

output

ultimate

goal

would

for

be

any

to

SGML

document.

make

this

process

section Listing "head" delimit section

might be marked up like the fragment in 1. Here, <head> and </head> (pronounced and "end head") are start and end tags that the head element. The parent of head is and its siblings are the two para elements.

automatic for the arbitrary only information that would

DTD

document. The

need

to pass from one

site to another in order to be the document instance, specification.

print a document would the DTD, and an output

A DTD also defines what "attributes" are associated with an element. An attribute is an an- notation that appears in the document instance and augments the information provided by the markup. Attributes appear within an element's start tag. If the element "head" has an attribute "id" for use in cross references, then that attribute can be assigned some value in the document instance, for example: <head id="overviewU>.

It is important to note that SGML allows the same element to appear in many contexts within a document structure. The same markup can be used to describe a chapter head, a section head. and even a table head. At some point, a distinction must be

<section> <head>SGML and FOSI S t r u c t u r e : An Overview</head>

<para>All SGML documents must conform t o c e r t a i n r u l e s t h a t a r e defined p a r t i a l l y by t h e s t a n d a r d and p a r t i a l l y by a prolog t o t h e document, which i s c a l l e d t h e document type d e f i n i t i o n (DTD).</para>

It appears that of all proposed output specifica- tion standards, the FOSI is the closest to becoming a recognized standard. In addition, the FOSI speci- fication is the easiest to implement. A FOSI is itself an SGML document that conforms to the Output Specification (OS, or outspec) DTD. But, instead of being made up of parts, chapters, or sections, a FOSI is made up of divisions that describe page models and the output format of each of the document's elements.

There are six major divisions in an output spec- ification instance: the security description (secdesc). the page description (pagedesc), the element style description (styldesc), the table element style de- scription (tabdesc), the graphical element descrip- tion (grphdesc), and the footnote area description (ftndesc). All but the pagedesc and styldesc are optional. There still is no definition for the output style of mathematical formula elements. Thus, the mathematics must either be passed through in the native language of the formatting system and trans- lated into the native language by the translator, or the output specification for the mathematical elements must be "hard wired" in the formatting system.

<para> I n a d d i t i o n t o being f i r s t off t h e

s t a r t i n g blocks t o becoming a n a t i o n a l

s t a n d a r d , t h e FOSI i s

also

the

most

manageable, </section>

</para>

Listing 1.

A Document Instance Fragment.

The style description is the most important di- vision of the outspec for simple text documents. The styldesc contains a document description (docdesc), zero or more environment descriptions (envdesc), and at least one formatting specification for an e-i-c. It is in these subdivisions that special FOSI elements called categories appear. Each category

410

TUGboat, Volume 12 (1991). No. 3-Proceedings

of the 1991 Annual Meeting

Document info
Document views15
Page views15
Page last viewedSat Dec 03 16:30:54 UTC 2016
Pages6
Paragraphs365
Words3905

Comments