contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
SGML Open Catalog: load a set of SOCAT catalogs and list the entries  
Introduction: SGML Open Catalog library examples  

Sample

  ;
  ; socatlst.xom -- load a set of SOCAT catalogs and list the entries
  ;
  ; Description
  ;
  ;  This is a diagnostic program used to develop the socat catalog loader.
  ;  It can also be used to see whether a catalog list loads the catalogs
  ;  in the way that you expect.
  ;
  ;  To run the program, give one of the following commands:
  ;
  ;     omnimark -s socatlst.xom -d socat yourcataloglist
  ;
  ;
  ;  For more information about the socat catalog loader and the loaded
  ;  catalogs, see the file socat.xin

  ; ----------------------------------------------------------------------

  down-translate

  include "socat.xin"

  global counter num-entries
  global stream catname initial { "socat01.tst;a_bad.cat:no.cat" }

  document-start

     ;List all catalogs, those from the catalog list, sub-catalogs,
     ;and delegate catalogs.  Delegate catalogs will be listed with
     ;their partial public identifier.
     output "============= catalogs ===========================%n"
     repeat over socat-catalog
        output key of socat-catalog || "%n"
     again

     ;List all entries in the loaded catalogs
     output "============= catalog entries ====================%n"
     repeat over socat-catalog-table
        output key of socat-catalog-table || "%n"
        output "%t" || socat-catalog-table || "%n"
     again

     ;List keyword extensions with counts
     output "============= keyword extensions =================%n"
     repeat over socat-extensions-count
        output key of socat-extensions-count
        output "%t%d(socat-extensions-count)%n"
     again

     set num-entries to number of socat-catalog-table
     output "%d(num-entries) catalog entries%n"

     halt with 0

 
----  

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:45 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.