Re: (docbook-tools) Re: Playing with the spec
Hi,
I did not want this to devolve to implementation details, but
since you ask, this is how Debian does it. Say we have package Foo,
versio 3.2, which has DTD's and stylesheets and documentation and the
works.
The package puts it's documentation in /usr/share/doc/foo, and
the dtd's and files go into /usr/share/foo (note: No version
number). The postinstallation script copies the DTD into
/usr/share/sgml/dtd/foo-3.2.dtd; the stylesheets goes into
/usr/share/sgml/style/foo-3.2.styles, and teh catalog snippet goes
into /etc/sgml/catalog.d/foo-3.2
Next, the post instal script calls update-catalog, and the
sgml.catalog is regenerated from all the snippets.
On an upgrade, the contents of /usr/share/foo and
/usr/share/doc/foo are replaced; but the catalog snippet persist
across versions.
The end result is:
Almost all dtds reside in /usr/share/sgml/dtds,
Almost all character sets reside in /usr/share/sgml/charsets
Almost all entities reside in /usr/share/sgml/entities
Almost all stylesheets reside in /usr/share/sgml/stylesheet
(I say almost all since there is provision in our policy for
things akin to /usr/share/sgml/dtds/Blah, analogous to /usr/bin/X11)
The added advantage of this simplified structure is that
simple scripts and humans do not have to go rooting through the
catalog to find out where the DTD is, or where the stylesheet lies.
Also, I, personally, find it convenient to just browse the
files in /usr/share/sgml/stylesheets/* while trying to learn by
example.
You see, people who create distributions do not need a spec to
tell them to keep directories around in order to have a working SGML
infrastructure -- indeed, I think the current directory structure is
an overspecification that I'd find very hard to interleave into my
local policy.
manoj
>>"Jorge" == Jorge Godoy <godoy@conectiva.com.br> writes:
Jorge> But then, how would you deal with the problem of multiple DTDs? Let me
Jorge> say that I have documents based on DocBook DTD 2.4, DocBook DTD 3.0
Jorge> and DocBook DTD 3.1. Filenames are the same (http://www.nwalsh.com has
Jorge> a link to these). How would you separate them? If we replace the
Jorge> files and keep only DocBook DTD 3.1 then documents marked up with 2.4
Jorge> would be broken.
Jorge> No using version numbers and placing all the files on the same
Jorge> directory would be intrusive with new packages and with
Jorge> already written ones. We'd have to, e.g., change all existing
Jorge> docbook catalogs from the DTDs and stylesheets.
Jorge> This catalog is created on the fly. It's based on OpenCatalog
Jorge> specs. When you install a new package, it calls certain scripts and
Jorge> passes the position of it's catalog and it's version number. Then, a
Jorge> reference to it is added to the main catalog.
Jorge> You'll have to know where to look for this catalog anyway.
--
The Constitution may not be perfect, but it's a lot better than what
we've got!
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C
Reply to: