
Guidelines for SGML packages
============================

Package dependencies
--------------------

All SGML packages that provide a DTD or entity description file have
to depend on "sgml-base". This package installs the "install-sgmlcatalog"
script and provides the necessary directory structure.


The SGML Description Files
--------------------------

The location of SGML description files (DTD's, entities, etc.) is
/usr/lib/sgml . All DTD's should be installed in /usr/lib/sgml/dtd ,
all entity description files should go into /usr/lib/sgml/entities .


The SGML Catalog
----------------

The SGML catalog file is /etc/sgml.catalog , but should be refered to
through the symbolic link /usr/lib/sgml/catalog . Furthermore, all
path specifications given in the SGML catalog have to be relativ
to /usr/lib/sgml .

Please don't modify the SGML catalog directly in the postinst/postrm
scripts of your package--you should use the install-sgmlcatalog script
for that.

Here is a simple example: Consider the package "foo" which provides the
DTD foo.dtd and an entity description file "foo-general". The package
will install the following files:

	/usr/lib/sgml/dtd/foo.dtd
        /usr/lib/sgml/entities/foo-general
        /usr/lib/foo/sgml.catalog
        
The sgml.catalog file will look like this:

	DOCTYPE foodoc            dtd/foo.dtd
	ENTITY %foo-general       entities/foo-general

That's the postinst script:

	#!/bin/sh
        install-sgmlcatalog --install /usr/lib/foo/sgml.catalog foo

and the postrm script:

	#!/bin/sh
        install-sgmlcatalog --remove foo

Please check the install-sgmlcatalog(8) manpage for details.


Feedback
--------

Please send me an email for bugs/suggestions/critics on these guidelines.

--
May 8, 1997
Christian Schwarz <schwarz@debian.org>
