Creating Compound Documents Using the DEC CDA Base Services

*HyperReader

  CONTENTS

  Title Page

  Copyright Page

  Preface

  1      Introduction

  1.1     Document Content and Form
    1.1.1      Compound Documents
      1.1.1.1      Revisable Documents
      1.1.1.2      Final Form Documents

  1.2     Compound Document Structures and CDA
    1.2.1      Document Root
    1.2.2      Encoding Aggregates
    1.2.3      Document Root Segment
    1.2.4      Document Layout
    1.2.5      Document Attributes

  1.3     Tree Structure and Depth Traversal

  2      Creating a DDIF Document Structure

  2.1     Preprocessor Control Lines and Declarations

  2.2     Creating the Root Aggregate

  2.3     Creating the Descriptor Aggregate

  2.4     Storing the Descriptor Handle in the Root Aggregate

  2.5     Filling in the Major Version Item

  2.6     Filling in the Minor Version Item

  2.7     Filling in the Product Identifier Item

  2.8     Filling in the Product Name Item

  2.9     Creating the Header Aggregate

  2.10    Storing the Header Aggregate Items

  2.11    Filling in the Header Languages Items
    2.11.1     Filling the First Element of the Enumeration Item Array
    2.11.2     Filling the First Element of the Value Item Array
    2.11.3     Filling the Second Element of the Enumerator Item Array
    2.11.4     Filling the Second Element of the Value Item Array

  2.12    Analysis Output with Root, Descriptor, and Header

  2.13    Creating the Root Segment Aggregate

  2.14    Creating the Segment Attributes Aggregate

  2.15    Storing the Content Aggregate Items

  2.16    Creating the Text Content Aggregate

  2.17    Analysis Output with Partial Content

  2.18    Inserting Additional Text and Spacing

  2.19    Creating an Output File

  2.20    Routines Created to Generate Directives

  2.21    Analysis Output with Full Content

  2.22    Text Example Output

  2.23    Complete Text Program Listing

  2.24    Processing the Sample Text Program
    2.24.1     Processing the Sample Program with VMS
    2.24.2     Converting the DDIF Output File on VMS
    2.24.3     Processing the Sample Program with ULTRIX
    2.24.4     Converting the DDIF Output File on ULTRIX
    2.24.5     Processing with OS/2 and MS-DOS
    2.24.6     Converting the DDIF Output File on OS/2 and MS-DOS

  2.25    VMS Build Procedure for the Text Example

  3      Simplifying the Encoding Process

  3.1     Header Files
    3.1.1      Book Header
    3.1.2      Main Header

  3.2     Created Functions
    3.2.1      Aggregate Function
    3.2.2      BaseDoc Function
    3.2.3      Constant Function
    3.2.4      DisplayError Function
    3.2.5      NewArray Function
    3.2.6      NewPath Function
    3.2.7      Path Function
    3.2.8      PutFile Function
    3.2.9      StrConst Function
    3.2.10     StrConstInfo Function
    3.2.11     String Function
    3.2.12     StringInfo Function
    3.2.13     ValConst Function
    3.2.14     ValConstInfo Function
    3.2.15     ValFloat Function
    3.2.16     Value Function
    3.2.17     ValueInfo Function

  3.3     Simplified Encoding of Text Example

  3.4     Build Procedures for Simplified Examples
    3.4.1      VMS Build Procedure
    3.4.2      ULTRIX Build Procedure
    3.4.3      OS/2 and MS-DOS Build Procedure

  3.5     Initial Setup Procedures

  4      Creating Paragraphs and Footnotes

  4.1     Encoding Paragraphs and Footnotes
    4.1.1      Initial Setup
    4.1.2      Root Segment Attributes
    4.1.3      Footnote Counter Bindings
    4.1.4      Footnote Counter Style and Type
    4.1.5      Measurement Units and Font Definitions
    4.1.6      Paragraph Definition and Segment Tag
    4.1.7      Paragraph Attributes
    4.1.8      Footnote Definition and Stream Tag
    4.1.9      Footnote Bindings
    4.1.10     Footnote Label Definition and Segment tag
    4.1.11     Specific Page Layout Information
    4.1.12     Page Layout Framing Parameters
    4.1.13     Main Text Frame Galley
    4.1.14     Footnote Text Frame Galley
    4.1.15     Formatting a Footnote as a Paragraph
    4.1.16     Creating a Footnote Segment
    4.1.17     Cross Referencing a Footnote
    4.1.18     Paragraph Text, Punctuation, and Line Spacing

  4.2     Paragraph and Footnote Example Listing

  4.3     Analysis Output of Paragraph and Footnote Example

  4.4     Paragraph and Footnote Example Output

  4.5     Paragraph and Footnote Program Flow Chart

  5      Creating Graphics

  5.1     Creating Boxes and Frames
    5.1.1      Initial Setup
    5.1.2      Encoding Introductory Text
    5.1.3      Encoding a Frame Structure
    5.1.4      Encoding the Output File
    5.1.5      Box and Frame Example Listing
    5.1.6      Analysis Output of Box and Frame Example
    5.1.7      Box and Frame Example Output

  5.2     Creating Lines and Polylines
    5.2.1      Encoding a Polyline
    5.2.2      Line and Polyline Example Listing
    5.2.3      Analysis Output of Line and Polyline Example
    5.2.4      Line and Polyline Example Output

  5.3     Creating Arcs and Circles
    5.3.1      Encoding a Filled-Area Arc
    5.3.2      Arc and Circle Example Listing
    5.3.3      Analysis Output of Arc and Circle Example
    5.3.4      Arc and Circle Example Output

  5.4     Creating Bézier Curves
    5.4.1      Encoding a Bézier Curve
    5.4.2      Bézier Curve Example Listing
    5.4.3      Analysis Output of Bézier Curve Example
    5.4.4      Bézier Curve Example Output

  5.5     Graphics Programs Flow Chart

  6      Creating Images

  6.1     Images
    6.1.1      Initial Setup
    6.1.2      Encoding the Image Attributes
    6.1.3      Encoding the Bounding Box
    6.1.4      Encoding the Image Data Units
    6.1.5      Image Example Listing
    6.1.6      Analysis Output of Image Example
    6.1.7      Image Example Output

  6.2     Image Program Flow Chart

  7      Creating External References

  7.1     External References
    7.1.1      Initial Setup
    7.1.2      Computing the External Reference
    7.1.3      The Included File
    7.1.4      External Reference Example Listing
    7.1.5      Analysis Output of External Reference Example
    7.1.6      External Reference Output
    7.1.7      External Reference Flow Chart

  8      Creating Compound Documents

  8.1     Single Source Method
    8.1.1      Initial Setup Procedures
    8.1.2      Traversing Nested Segments
    8.1.3      Encoding the Text Section
    8.1.4      Encoding the Graphic Section
    8.1.5      Encoding the Image Section
    8.1.6      Analysis Output of Compound Document Example

  8.2     Multiple Source Method
    8.2.1      Encoding the Compound Document Creation File
    8.2.2      Encoding the Text Document
    8.2.3      Encoding the Graphic Document
    8.2.4      Encoding the Image Document

  8.3     External Reference Method
    8.3.1      Initial Setup Procedures
    8.3.2      Encoding the Text Reference
    8.3.3      Encoding the Image Reference
    8.3.4      Encoding the Graphic Reference
    8.3.5      Computing the External References
    8.3.6      Analysis Output of External Reference Example

  A   Reference Tables and Charts

  B   DDIF Document Structuring Conventions

  B.1     Guidelines
    B.1.1      Object Hierarchies
    B.1.2      Logical Object Formation
    B.1.3      Object Hierarchy
    B.1.4      Segment-type Hierarchy
    B.1.5      Object Attributes

  B.2     Document Structure
    B.2.1      Root Segment Attributes
    B.2.2      Root Segment Bindings

  B.3     Structure Notation

  B.4     Flow
    B.4.1      Flow Bindings
    B.4.2      Flow Attributes

  B.5     Text

  B.6     Paragraphs
    B.6.1      Paragraph Bindings
    B.6.2      Paragraph Attributes
    B.6.3      Paragraph Labels
    B.6.4      Paragraph Label Attributes

  B.7     Footnotes
    B.7.1      Footnote Bindings
    B.7.2      Footnote Attributes
    B.7.3      Footnote Labels
    B.7.4      Footnote Label Bindings
    B.7.5      Footnote Label Attributes

  B.8     Cross References
    B.8.1      Cross Reference Attributes
    B.8.2      Cross Reference Bindings

  B.9     Superscripts and Subscripts

  B.10   Galleys
    B.10.1     Galley Attributes
    B.10.2     Galley Bindings

  B.11   Graphics
    B.11.1     Graphics Content
    B.11.2     Graphics Attributes

  B.12   Figure
    B.12.1     Figure Attributes

  B.13   List
    B.13.1     List Attributes
    B.13.2     List Bindings

  B.14   List Element
    B.14.1     List Element Bindings
    B.14.2     List Element Attributes

  B.15   List Element Label

  B.16   Images
    B.16.1     Image Attributes
    B.16.2     Image Bindings

  B.17   External References
    B.17.1     External Reference Attributes
    B.17.2     External Reference Labels

  C   Common Usage and Logical Structure Applications

  C.1     External References

  C.2     Conformance Tags

  C.3     Document Structure Declaration

  C.4     Element Attribute Storage

  C.5     Element Attribute Declarations

  C.6     Content Definitions

  C.7     DDIF Document Content Category

  C.8     DDIF Document Content Primitives
    C.8.1      Segment Primitive
    C.8.2      Text Primitive
    C.8.3      Layout Primitive
    C.8.4      Content Reference Primitive

  C.9     Private Data

  C.10   Analysis Example of a Generic Logical Structure Application

  Glossary of DDIS/DDIF Terms

  EXAMPLES

  2-1        Complete Sample Text Program Listing

  2-2        Text1 Example Build Procedure

  3-1        Simplified Encoding of Text Example

  4-1        Paragraph and Footnote Example Listing

  4-2        Analysis Output of Paragraph and Footnote Example

  5-1        Box and Frame Example Listing

  5-2        Analysis Output of Box and Frame Example

  5-3        Line and Polyline Example Listing

  5-4        Analysis Output of Line and Polyline Example

  5-5        Arc and Circle Example Listing

  5-6        Analysis Output of Arc and Circle Example

  5-7        Bézier Curve Example Listing

  5-8        Analysis Output of Bézier Curve Example

  6-1        Image Example Listing

  6-2        Analysis Output of Image Example

  7-1        External Reference Example Listing

  7-2        Analysis Output of External Reference Example

  C-1        Example of a Generic Logical Structure Application

  FIGURES

  1 DEC CDA Base Services Documentation Map

  1-1        Basic Compound Document Structure

  1-2        Basic Structure Aggregates

  1-3        Aggregates and Subaggregates

  1-4        Tree Structure and Traversal

  2-1        Text Example Output

  4-1        Paragraph and Footnote Example Output

  4-2        Paragraph and Footnote Program Flow Chart

  5-1        Box and Frame Example Output

  5-2        Line and Polyline Example Output

  5-3        Arc and Circle Example Output

  5-4        Bézier Curve Example Output

  5-5        Graphics Programs Flow Chart

  6-1        Image Example Output

  6-2        Image Program Flow Chart

  7-1        External Reference Output

  7-2        External Reference Flow Chart

  8-1        Compound Document Output

  A-1        DDIF Fill Patterns

  TABLES

  A-1        Access Routines

  A-2        Standard Content Aggregates

  A-3        Segment Attributes

  A-4        Created Functions