This is the mail archive of the
docbook-tools-discuss@sourceware.cygnus.com
mailing list for the docbook-tools project.
Problems when using our own stylesheets
- To: Docbook Discuss list <docbook-tools-discuss at sourceware dot cygnus dot com>
- Subject: Problems when using our own stylesheets
- From: Eric Bischoff <ebisch at cybercable dot tm dot fr>
- Date: Sat, 9 Oct 1999 17:30:14 +0200
- References: <19991008122338.A797@vasili.rlf.org>
Hi all,
Would it be possible to replace the db2ps file in the docbook-tools distribution
with the one that is pasted qt the end of this message ?
It corrects two problems :
- there was no way to specify an alternate stylesheet
- it did only accept .sgml or .sgm as an extension for docbook files.
we must use some other extension here at KDE because the old LinuxDoc docs
already used
There's also another problem if you do not use cygnus-both dsl stylesheet. This
file starts with :
<!ENTITY % html "IGNORE">
<![%html;[
<!ENTITY % print "IGNORE">
<!ENTITY docbook.dsl SYSTEM "/usr/lib/sgml/stylesheets/nwalsh-modular/html/docbook.dsl" CDATA dsssl>
]]>
<!ENTITY % print "INCLUDE">
<![%print;[
<!ENTITY docbook.dsl SYSTEM "/usr/lib/sgml/stylesheets/nwalsh-modular/print/docbook.dsl" CDATA dsssl>
]]>
]>
This is basically a redirection because docbook-tools don't use the same
directory tree as Norman Walsh does. But the problem is that those are absolute
paths, and it would be better to use the catalog file to store such paths.
I know there are several workarounds (store the same lines at the beginning of
our stylesheet ; use symbolic links ; edit the catalog) but no one is perfect.
It would be better to do it some other way in the docbook-tools.
Just my two pence contribution.
Eric
KDE documentation coordinator
======================== /usr/bin/db2ps =======================================
#! /bin/sh
TMPFN=db2pstmp$$
DB_STYLESHEET=""
case $1 in
-d) DB_STYLESHEET="-d $2"
shift 2
;;
esac
if [ $# -gt 2 ]
then
echo "Usage: `basename $0` [-d stylesheet.dsl] [filename.sgml]" >&2
exit 1
fi
output="`echo $1 | sed 's,\.sgml$,.ps,;s,\.sgm$,.ps,;s,\.docbook$,.ps,'`"
outdvi="`echo $1 | sed 's,\.sgml$,.dvi,;s,\.sgm$,.dvi,;s,\.docbook$,.dvi,'`"
db2dvi $DB_STYLESHEET $1
dvips $outdvi -o $output
exit 0