


SGMLS(1)                 USER COMMANDS                   SGMLS(1)



NAME
     sgmls - a validating SGML parser

     An SGML System Conforming to
     International Standard ISO 8879 -
     Standard Generalized Markup Language

SYNOPSIS
     sgmls [ -deglprsuv ] [ -cfile ] [ -iname  ]  [  -mfile  ]  [
     filename... ]

DESCRIPTION
     Sgmls parses and  validates  the  SGML  document  entity  in
     filename... and prints on the standard output a simple ASCII
     representation of its  Element  Structure  Information  Set.
     (This  is  the  information set which a structure-controlled
     conforming SGML application should act upon.) Note that  the
     document  entity  may  be  spread amongst several files; for
     example, the SGML declaration, document type declaration and
     document  instance set could each be in a separate file.  If
     no filenames are specified, then sgmls will read  the  docu-
     ment  entity  from  the standard input.  A filename of - can
     also be used to refer to the standard input.

     The following options are available:

     -cfile
          Report any capacity limits that are exceeded and  write
          a  report  of capacity usage to file.  The report is in
          the format of a RACT result.   RACT  is  the  Reference
          Application  for  Capacity  Testing defined in the Pro-
          posed American National  Standard  Conformance  Testing
          for  Standard Generalized Markup Language (SGL) Systems
          (X3.190-199X), Draft July 1991.

     -d   Warn about duplicate entity declarations.

     -e   Describe open entities in error messages.   Error  mes-
          sages  always include the position of the most recently
          opened external entity.

     -g   Show the GIs of open elements in error messages.

     -iname
          Pretend that

               <!ENTITY % name "INCLUDE">

          occurs at the start of the  document  type  declaration
          subset  in  the  SGML  document entity.  Since repeated
          definitions of an entity are ignored,  this  definition
          will take precedence over any other definitions of this



Sun Release 4.1           Last change:                          1






SGMLS(1)                 USER COMMANDS                   SGMLS(1)



          entity in the document type declaration.   Multiple  -i
          options  are allowed.  If the SGML declaration replaces
          the reserved name INCLUDE then the  new  reserved  name
          will  be the replacement text of the entity.  Typically
          the document type declaration will contain

               <!ENTITY % name "IGNORE">

          and will use %name; in the status keyword specification
          of  a  marked  section  declaration.   In this case the
          effect of the option will be to cause the  marked  sec-
          tion not to be ignored.

     -l   Output L commands giving the current  line  number  and
          filename.

     -mfile
          Map public identifiers and entity names to system iden-
          tifiers using the catalog entry file file.  Multiple -m
          options are allowed.   Catalog  entry  files  specified
          with   the  -m  option  will  be  searched  before  the
          defaults.

     -p   Parse only the prolog.  Sgmls will exit  after  parsing
          the document type declaration.  Implies -s.

     -r   Warn about defaulted references.

     -s   Suppress output.  Error messages will still be printed.

     -u   Warn about undefined elements: elements used in the DTD
          but not defined.

     -v   Print the version number.

  Entity Manager
     An external entity resides in one or more files.  The entity
     manager  component of sgmls maps a sequence of files into an
     entity in three sequential stages:

     1.   each carriage return character is turned  into  a  non-
          SGML character;

     2.   each newline character is  turned  into  a  record  end
          character,  and at the same time a record start charac-
          ter is inserted at t