Next (absent) Up Previous Contents
Up: Upconverter program descriptions
Previous: latex2sgml
[ID index][Keyword index]

parse - Do SGML parsing of a document.

Description

This script performs the minor convenience of invoking the SGML parser nsgmls with the right SGML declaration and catalog; this is almost trivial but making sure you have the right declaration is just fiddly enough that it's useful to not have to think about it. It determines what declaration to use by its inside knowledge about which DTDs use which declarations. In fact, the default starsgml setup will allow use of nsgmls without explicitly specifying a declaration on Starlink documents, but in this case the declaration is wrong for non-Starlink documents, such as those in HTML. The main difference is that the Starlink declaration is case-sensitive.

All flags are passed unchanged to the nsgmls program.

The nsgmls binary must be in the path, and the STARLINK_SGML_DIR directory must be set correctly.

Examples

Example 1:

     parse -s sun123.sgml
        

This runs nsgmls on the named file, suppressing normal output. Any parse errors will be written to standard error. If there is no output then the document conforms to the DTD.

Authors
nsgmls

The nsgmls program and its output format are documented fully elsewhere. A representation of the ESIS of the document (this is very verbose) is written to standard output, unless suppressed with the -s flag. Any discrepancies with the DTD which the parser encounters cause a message to be written to standard error (this may be redirected using the -f flag). This error message consists of 5 colon-separated fields as follows:

  1. The name of the parser (nsgmls)
  2. The name of the document being parsed
  3. The line number on which the error occurred
  4. The character column on that line on which the error occurred
  5. A letter indicating the kind of message this is:
    W
    Warning
    X
    Crossreference failed
    E
    Conformance error
  6. Text describing the error
Note that warnings of type `W' which complain about not being able to generate system identifiers for document summaries are harmless and can be ignored.


Next (absent) Up Previous Contents
Up: Upconverter program descriptions
Previous: latex2sgml
[ID index][Keyword index]