This is the mail archive of the docbook-tools-discuss@sourceware.cygnus.com mailing list for the docbook-tools project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problems when using our own stylesheets


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]