David Nebauer <> writes:
> I'd already tried 'dtdflatten' but it does not seem to like my Debian
> default setup. Actually, all of the tools in SGML::DTDParse have the
> same reaction regarding the default catalog file:
>
> ----------------------------------------------------------------------------------------
> $ dtdflatten /usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd
> Reading /etc/sgml/catalog...
> Don't know how to parse CATALOG keyword: CATALOG
> $
> ----------------------------------------------------------------------------------------
>
> In particular, it complains that the default catalog file contains
> 'CATALOG' keywords. This is unfortunate as _every_ line starts with the
> CATALOG keyword.
I ran into the same problem with it. As a workaround, try this:
$ SGML_CATALOG_FILES= dtdflatten /usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd
That is, run it with the value of the SGML_CATALOG_FILES
environment variable unset.
You might also want to try the "flatten" script that's in the
DocBook Project cvstools module. I put a copy here:
http://docbook.sourceforge.net/outgoing/flatten
You can also grab it through anonymous CVS:
cvs -z3 -d:pserver::/cvsroot/docbook co -r build -P cvstools/flatten
If you grab it from CVS, make sure to use the "-r build" switch --
because the "build" branch version is a currently different than
what's in the CVS HEAD branch. The version in the HEAD branch is
Norm Walsh's original. The version in the "build" branch includes
a hack I added (a backtick invocation of xmlcatalog(1) to handle
resolving system IDs that have remote URIs).
--Mike
--
Michael Smith
http://sideshowbarker.net/