Bug 51478 - /etc/sgml/sgml-docbook.cat symlink is wrong
Summary: /etc/sgml/sgml-docbook.cat symlink is wrong
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: docbook-utils   
(Show other bugs)
Version: 7.3
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-08-10 20:09 UTC by Peter Bowen
Modified: 2008-05-01 15:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-02-05 18:05:15 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Non-working docbook file (148 bytes, text/plain)
2001-08-11 14:28 UTC, Peter Bowen
no flags Details

Description Peter Bowen 2001-08-10 20:09:00 UTC
The post install script for all the docbook-dtd packages create the
/etc/sgml/sgml-docbook.cat symlink to their catalog, if it doesn't already
exist.  This creates a problem because jade can then only find one dtd,
instead of all that are installed.  It should instead have a permenant
symlink for /etc/sgml/sgml-docbook.cat to /etc/sgml/catalog, which includes
all the other catalogs.

Comment 1 Tim Waugh 2001-08-10 22:00:31 UTC
But jade's default catalog is /etc/sgml/catalog.  The symlink is 'the latest 
docbook version installed', and is there for convenience.  If you know that 
you are using the latest docbook version, and you don't want jade to search 
_all_ the catalogs, you can point it at the symlink.

Comment 2 Sean Dilda 2001-08-10 23:22:52 UTC
It documents that it uses /etc/sgml/catalog, but experimentation shows that it
uses /etc/sgml/sgml-docbook.cat when running commands like db2ps

Comment 3 Tim Waugh 2001-08-11 12:41:47 UTC
Please show me the steps to reproduce the problem; I don't see it.  Thanks.

Comment 4 Peter Bowen 2001-08-11 14:27:01 UTC
Traced down the problem - it looks like it should be actually filed against
docbook-utils.  It only occurs when using a doctype that isn't standard docbook,
such as the GNOME PNG Variant V1.0 that dcm wrote.  

To test this, and see the broken behaviour:
Get the gnome-doc-tools-2-0 rpm from http://people.redhat.com/dcm/ and install
it.  Then try to do db2ps on the attached docbook file.  

It will fail because /usr/share/sgml/docbook/frontends/docbook is trying to find
/etc/sgml/sgml-docbook-1.0.cat.  If this file doesn't exist, the fallback is to
use /etc/sgml/sgml-docbook.cat which doesn't know about the doctype either.

I imagine that this was done so that documents without any doctype at all could
be compiled/converted, but it breaks the GNOME doc stuff (and anyone else with a
custom doctype)

Comment 5 Peter Bowen 2001-08-11 14:28:29 UTC
Created attachment 27396 [details]
Non-working docbook file

Comment 6 Tim Waugh 2001-08-11 14:41:01 UTC
Thanks.  In that case it should fall back to /etc/sgml/catalog as you 

Comment 7 Tim Waugh 2001-08-13 10:08:47 UTC
Come to think of it, the docbook-utils way of handling this is probably to 
create a new frontend.

cp /usr/share/sgml/docbook/utils-0.6.9/frontends/docbook{,-png}

and fix up docbook-png so that it figures out the version number needed or 
falls back to the symlink (i.e. change the regexp).  That will make it faster 

I've mentioned this to the maintainer, so we'll see what he says.  But IMHO 
the png frontend is the way forward.

Comment 8 Tim Waugh 2001-08-17 11:50:53 UTC
The maintainer's view is that the DTD's FPI is wrong, and that you should have 
to use -c explicitly (just like the KDE people do, apparently).

If the DTD's FPI were derived using the algorithm that TDG mentions, this 
would work.  However, it isn't.  I think the correct one would be something 

-//GNOME//DTD DocBook V3.1-Based PNG Variant V1.0//EN

Comment 9 David Mason 2001-08-17 14:09:11 UTC
Well it is too late to change the FPI now - this is in use throughout the GNOME
project. I have been pleading with people to start using DB 4.1 since it handles
png's fine. I don't know any other way to handle this in my gnome-doc-tools
package - we have to use -c

Comment 10 Peter Bowen 2001-08-17 14:33:09 UTC
I am still unclear as to why the fallback isn't /etc/sgml/catalog.  It seems
from the code that it tried sgml-docbook-{verison}.cat, then tried
sgml-docbook.cat.  It there an advantage to falling back to

Comment 11 Tim Waugh 2001-08-17 14:40:10 UTC
Eric Bischoff claims that there are 'various technical problems' with falling 
back to /etc/sgml/catalog, although he hasn't explained exactly what they are.

Comment 12 David Mason 2001-08-17 14:45:31 UTC
urrrgh! (sorry, blatent waste of bugzilla space)

Comment 13 Tim Waugh 2001-11-06 10:17:16 UTC
Oh, I've thought of a technical problem: XML tools might not understand full 
SGML, and so pointing them to SGML DTDs is bad.  Here's the current 
docbook-utils docbook frontend code:

        SGML_VERSION=[hairy regexp that gets confused by PNG-variant]
        if [ -f ${SGML_CATALOGS_DIR}/${SGML_XML}-docbook-${SGML_VERSION}.cat ]
         then echo "[...]${SGML_XML}-docbook-${SGML_VERSION}.cat"
        else echo "[...]/${SGML_XML}-docbook.cat"

If we change '${SGML_XML}-docbook.cat' to 'catalog', that's bad if SGML_XML is 
'xml' (i.e. it's DocBook XML).

So how about this:

elif [ "${SGML_XML}" != "sgml" ]
then echo "[...]/${SGML_XML}-docbook.cat"
else echo "[...]/catalog"

Comment 14 Tim Waugh 2002-02-06 16:40:21 UTC
Fixed in 0.6.9-21.

Note You need to log in before you can comment on or make changes to this bug.