This section is no longer oriented toward tasks, but toward software that you can use to write and process SGML.

The simplest way to get all these tools is to install task-sgml (Debian package).

PSGML (Debian package)

An excellent SGML mode for Emacs. Among its many features, it can:

Its documentation is in Debian documentation (the link will work only if you installed the package "psgml").

Having some options set up in your ~/.emacs will ease your use of psgml. Here are some examples:

	  (autoload 'xml-mode "psgml" "Major mode to edit XML files." t )
               auto-mode-alist (append '(
                           ;; DocBook-XML
                           ("\\.db" . xml-mode)

          (add-hook 'sgml-mode-hook 'turn-on-auto-fill)
          (setq sgml-custom-dtd '(
            ( "HTML 4.0 Strict"
              "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\"
              \"dtd/html-4.0s.dtd\">" )
            ( "HTML 4.0 Blaireau"
              "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML Transitional 4.0//EN\"
              \"dtd/html-4.0-loose.dtd\">" )
            ( "DocBook 3.1 XML Article"
               "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
               <!DOCTYPE article PUBLIC \"-//Norman Walsh//DTD DocBk XML V3.1//EN\"
               \"dtd/docbook-xml/docbookx.dtd\">" )
          (setq sgml-insert-missing-element-comment nil)


Among the most useful psgml commands:

nsgmls (Debian package)

An SGML tool, for instance for validating SGML documents. A typical use is to check the validity of a document:

	nsgmls -s file.sgml

This will check whether or not the contents of the file file.sgml conform to the DTD indicated in the header of the file.

If you write XML documents, two options of nsgmls are necessary:

	nsgmls -s -wxml /usr/lib/sgml/declaration/xml.dcl file.sgml

There is a Debian documentation (the link will work only if you installed the package "sp"). nsgmls being a part of the sp package, the Debian documentation (the link will work only if you installed the package "sp") for sp may be useful too.

rxp (Debian package)

A pure XML tool; can, for instance, be used to validate XML documents.

jade (Debian package)

jade is a DSSSL processor. It takes an SGML file and a stylesheet, written in the DSSSL language, and produces output in the TeX (for which PostScript can be made), RTF or HTML formats. It has no backend for groff and therefore has trouble producing ASCII. The TeX backend produces jadetex files.

The documentation is not really clear but it at leasts tell you the various options. See Debian documentation (the link will work only if you installed the package "jade").

Typical uses:

	jade -t backend-to-use -d stylesheet-name input-file

jadetex (Debian package)

A set of TeX macros to process the output of jade. Poorly documented and difficult to customize. Like with every TeX macros, several runs may be necessary, in particular to resolve references.

SGMLtools (Debian package)

The SGMLtools exist in two versions, 1 and 2. SGMLtools is the version 2.

Unlike sgml-tools, version 1, which processes LinuxDoc documents, SGMLtools, version 2, treats DocBook documents. You can do everything it does with direct calls to jade but it may be simpler to use SGMLtools.

sgml-tools, version 1 (Debian package)

[1] This version is officially deprecated and should no longer, in theory, be used anymore. But, in practice, since the move of the Linux Documentation Project from LinuxDoc to the DocBook DTD never occured, you still need sgml-tools version 1.

Norman Walsh's "DocBook Modular Stylesheets" (Debian package)

These are a set of DSSSL stylesheets (with a recent XSL version). You can use them with any DSSSL tool, like jade to process DocBook documents.



Did you notice the change in the capitalization?