Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32243 - sgmltools fails to generate files - Couldn't resolve pubid ["-//SGMLtools//DOCUMENT Docbook Style Sheet for HTML//EN"]
Summary: sgmltools fails to generate files - Couldn't resolve pubid ["-//SGMLtools//DO...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Text-Markup Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-28 22:39 UTC by Stephen Torri
Modified: 2003-11-24 19:18 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Contents of sgmltools.cat (sgmltools.cat,1.90 KB, text/plain)
2003-11-15 08:58 UTC, Stephen Torri
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Torri 2003-10-28 22:39:17 UTC
I have tested compiling various sgml files with sgmltools (3.0.3). Each time I get the following error:

bash-2.05b$ sgmltools gnome-xine.sgml
Traceback (most recent call last):
  File "/usr/bin/sgmltools", line 93, in ?
    tool.processFile(curfile)
  File "/usr/share/sgml/misc/sgmltools/python/SGMLtools.py", line 230, in processFile
    dssslfile = utils.findStylesheet(stylesheet, self._aliases)
  File "/usr/share/sgml/misc/sgmltools/python/utils.py", line 307, in findStylesheet
    return findStylesheet(name, aliases)
  File "/usr/share/sgml/misc/sgmltools/python/utils.py", line 317, in findStylesheet
    raise IOError, "Couldn't resolve pubid [%s]" % id
IOError: Couldn't resolve pubid ["-//SGMLtools//DOCUMENT Docbook Style Sheet for HTML//EN"]
Comment 1 Stephen Torri 2003-10-28 22:40:22 UTC
bash-2.05b$ sudo emerge info
Password:
Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.20-gentoo-r5)
=================================================================
System uname: 2.4.20-gentoo-r5 i686 Pentium III (Katmai)
Gentoo Base System version 1.4.3.10p1
distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config
/usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs fixpackages"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ mad mikmod
mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib
gtkhtml alsa gdbm berkdb slang readline arts tetex bonobo svga tcltk java
guile mysql X sdl gpm tcpd pam libwww ssl perl python esd imlib oggvorbis
gnome gtk qt kde motif opengl mozilla ldap snmp cdr gtk2 xml tiff libgda
doc"
Comment 2 Mike Gardiner (RETIRED) gentoo-dev 2003-10-29 18:31:38 UTC
have you in/reinstalled any docbook/sgml packages lately ? can you please
check:
.) /etc/sgml/catalog lists /etc/sgml/sgml-lite.cat
.) /etc/sgml/sgml-lite.cat lists /usr/share/sgml/stylesheets/sgmltools/sgmltoolcat
.) sgmltools.cat exists in /usr/share/sgml/stylesheets/sgmltools ?

if you could provide additional information, such as any recent docbook/sgml/package
upgrades or installations it would most appreciated.

thanks.
Comment 3 Mike Gardiner (RETIRED) gentoo-dev 2003-10-29 18:33:04 UTC
in the previous comment:
/etc/sgml/sgml-lite.cat lists /usr/share/sgml/stylesheets/sgmltools/sgmltoolcat

should be:
/etc/sgml/sgml-lite.cat lists /usr/share/sgml/stylesheets/sgmltools/sgmltools.cat
Comment 4 Stephen Torri 2003-10-30 09:11:33 UTC
/etc/sgml/catalog lists /etc/sgml/sgml-lite.cat - YES

/etc/sgml/sgml-lite.cat lists /usr/share/sgml/stylesheets/sgmltools/sgmltools.cat
- YES

sgmltools.cat exists in /usr/share/sgml/stylesheets/sgmltools ? YES

I have not rebuilt sgmltools lately. I used genlop to see the merge history
of sgmltools-lite. The last time I merge it was:

bash-2.05b$ genlop -t sgmltools-lite

 * app-text/sgmltools-lite

     Merged   at Sat Sep  6 01:34:29 2003    (sgmltools-lite-3.0.3-r6)
       merge time: 32 seconds.

 merged totally 1 time in 32 seconds.

Comment 5 Mike Gardiner (RETIRED) gentoo-dev 2003-11-01 18:27:20 UTC
please post the output of env | grep SGML. sgmltools definitely checks the
SGML_CATALOG_FILES environment variables for a list of the catalogs so that
it knows where to find, in this case, the stylesheets.
Comment 6 Stephen Torri 2003-11-02 13:04:27 UTC
bash-2.05b$ env | grep SGML
SGML_CATALOG_FILES=/etc/sgml/sgml-ent.cat:/etc/sgml/sgml-docbook.cat:/etc/sgml/sgml-docbook-3.1.cat:/etc/sgml/sgml-docbook-3.0.cat:/etc/sgml/sgml-docbook-4.1.cat:/etc/sgml/dsssl-docbook-stylesheets.cat:/etc/sgml/sgml-docbook-4.0.cat:/etc/sgml/openjade-1.3.2.cat:/etc/sgml/sgml-lite.cat
Comment 7 Mike Gardiner (RETIRED) gentoo-dev 2003-11-04 01:16:24 UTC
okay, im finding this one hard to reproduce. is "//SGMLtools/DOCUMENT Docbook
Style Sheet for HTML//EN" listed in /etc/sgml/aliases ? i dont suppose remerging
sgmltools-lite helps in any way ?
Comment 8 Stephen Torri 2003-11-04 07:00:14 UTC
Rebuilding does not change anything. Try downloading the CVS version of xine-lib
and build the documentation.

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xine login

<Press Enter when asked for password. The anonymous password is blank.>

cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xine co xine-lib

cd xine-lib

./autogen.sh

cd doc

make

That is how I produce the error I originally reported.
Comment 9 Mike Gardiner (RETIRED) gentoo-dev 2003-11-04 07:20:14 UTC
i noticed from your first post you were using something xine so i rebuilt
it earlier today, with success.
Comment 10 Stephen Torri 2003-11-04 23:37:56 UTC
Mike mentioned that he rebuilt 'something xine'. Was that the xine-lib that
I talked about from the CVS? I need to know if this is my gentoo box with
sgmltool or xine-lib. This will help in talking with the right party.
Comment 11 Mike Gardiner (RETIRED) gentoo-dev 2003-11-05 00:52:15 UTC
hrmm, i got the cvs version and did make doc as you requested and everything
built fine for me, i didnt see any sgml errors, and i did see html files
created.

your error was this >>
IOError: Couldn't resolve pubid ["-//SGMLtools//DOCUMENT Docbook Style Sheet
for HTML//EN"].

if we follow this through what happens is that the SGML_CATALOG_FILES variable
includes /etc/sgml/sgml-lite.cat. this catalog in turn tells sgmltools to
look in /usr/share/sgml/stylesheets/sgmltools/sgmltools.cat for the catalog
definition.

does /etc/sgml/aliases exist ? although it should've been installed with
sgmltools-lite.
Comment 12 Stephen Torri 2003-11-05 11:04:18 UTC
Yes the file /etc/sgml/aliases does exist.

bash-2.05b$ ls /etc/sgml/
aliases                        sgml-docbook-3.0.cat  sgml-ent.cat
catalog                        sgml-docbook-3.1.cat  sgml-lite.cat
catalog.d                      sgml-docbook-4.0.cat  sgml.cenv
dsssl-docbook-stylesheets.cat  sgml-docbook-4.1.cat  sgml.conf
openjade-1.3.2.cat             sgml-docbook.cat      sgml.env

bash-2.05b$ qpkg -f /etc/sgml/aliases -I -i
app-text/sgmltools-lite-3.0.3-r6 *
        Python interface to SGML software specificially in a [ http://sgmltools-lite.sourceforge.net/
]
Comment 13 Stephen Torri 2003-11-06 18:18:16 UTC
Moving /etc/sgml/aliases to be /etc/sml/old_aliases does not remove the problem.
I thought I would try this but I still get a failure back from sgmltools.
Comment 14 Michael Kefeder 2003-11-14 06:44:47 UTC
I have the same problem... i installed sgmltools-lite today. They worked fine. Then i logged out of the box for lunch-time. After i logged back in sgmltools stopped with the error

IOError: Couldn't resolve pubid ["-//SGMLtools//DOCUMENT Docbook Style Sheet for Print//EN"]

I confirmed that behaviour on my gentoo machine at home - installed sgmltools-lite - tested - sgmtools worked - logged out - logged in - sgmltools stopped working... I have no idea how to fix that problem, because that with that catalog thingy it is hard to track where it should find what and why...
Comment 15 Michael Kefeder 2003-11-14 07:10:06 UTC
I think i got a fix for that

# nano /etc/sgml/sgml-lite.cat

and make the line in there look like

CATALOG "/usr/share/sgml/stylesheets/sgmltools/sgmltools.cat"

note the quotation marks - they are a must - the regular expression in /usr/share/sgml/misc/sgmltools/python/utils.py forces their existance! After i added the "" it worked for me.

I'd consider that a bug or misfeature in sgmltools, but patching sgmltools would be quite pointless. That change of the .cat file fixed it for me, on both machines - at work and at home.
i hope it works for you too.
Comment 16 Mike Gardiner (RETIRED) gentoo-dev 2003-11-14 08:01:13 UTC
Hi Michael, good work.

However, my sgml-lite.cat allready quotes (" ") the catalog location. Were the quotations missing on your catalog originally ?
Comment 17 Mike Gardiner (RETIRED) gentoo-dev 2003-11-14 08:02:04 UTC
please read above, just added you to the CC
Comment 18 Michael Kefeder 2003-11-14 13:01:14 UTC
I tried to reproduce how the "" marks get lost, but i'm out of machines now ;) reinstalling sgmltools wont change that file. It's strange because it worked right after i emerged the package and its dependancies (maybe due to some env-var?) but it stopped working after relogin. There's something mysterious going on ;)
Comment 19 Stephen Torri 2003-11-14 14:38:51 UTC
My /etc/sgml/sgml-lite.cat is as follows CATALOG "/usr/share/sgml/stylesheets/sgmltools/sgmltools.cat". With or without quotes it still does not work. In regards to logging in and out I am typically constantly logged in at home. I will log out and see what happens.
Comment 20 Michael Kefeder 2003-11-15 07:56:42 UTC
i installed sgmtools-lite on yet another machine w/o anything docbook related on it - the quotation marks are _missing_ in the /etc/sgml/sgml-lite.cat file by default!

Stephen: what's the content of /usr/share/sgml/stylesheets/sgmltools/sgmltools.cat? Does it contain a line

PUBLIC "-//SGMLtools//DOCUMENT Docbook Style Sheet for HTML//EN" html.dsl

I fixed 3 machines by adding the quotes... i'm afraid i can't help you with your problem (although my error message was the same).
Comment 21 Stephen Torri 2003-11-15 08:58:44 UTC
Created attachment 20783 [details]
Contents of sgmltools.cat

Here is the contents of my sgmltools.cat file. I did find html.dsl and the text
had quotes around it.
Comment 22 Mike Gardiner (RETIRED) gentoo-dev 2003-11-20 23:21:10 UTC
Hi Stephen,

o  Do you have xhtml1 installed at all ?
o  Can you please paste the output of sgmltools -v so we can see with some more verbose output, thanks.
Comment 23 Stephen Torri 2003-11-21 07:30:54 UTC
xhtml1 was not installed. I installed it or should I have not done that?

Here is the output of running sgmltools with the verbose flag on:

bash-2.05b$ sgmltools -v -b onehtml faq.sgml
Traceback (most recent call last):
  File "/usr/bin/sgmltools", line 93, in ?
    tool.processFile(curfile)
  File "/usr/share/sgml/misc/sgmltools/python/SGMLtools.py", line 230, in processFile
    dssslfile = utils.findStylesheet(stylesheet, self._aliases)
  File "/usr/share/sgml/misc/sgmltools/python/utils.py", line 317, in findStylesheet
    raise IOError, "Couldn't resolve pubid [%s]" % id
IOError: Couldn't resolve pubid [sgmltools-onehtml]
Comment 24 Michael Kefeder 2003-11-21 12:15:51 UTC
what does /etc/sgmltools/aliases say? there must be aline like

sgmltools-onehtml "-//SGMLtools//DOCUMENT Docbook Style Sheet for HTML//EN"#onehtml

for sgmltools to know what to look at. sgmltools-<backend> is the format as you probably can guess. if you use "sgmltools -b onehtml" it will look for the DTD referenced in aliases and then try to find the DTD in the .cat files.
hth
 Mike
Comment 25 Stephen Torri 2003-11-24 19:18:44 UTC
I installed xhtml1 and ensured that the /etc/sgml/aliases file as in placed and right. I was able to build xine-lib documentaiton with sgmltools. I found that gtk-doc conflicted with xhtml1 during a upgrade so I replaced xhtml1. The documentations builds find with gtk-doc. So I am going to claim that I originally did not have xhtml1 installed so I could not resolve dtd information. So I would recommend suggesting that a user installing sgmltools might want gtk-doc/xhtml1.