It may be me, or it may be the Linux implementation of XML Catalogs on
slackware. Whichever, please shed some light on this XML Catalog problem.
When using the --catalogs option, xmllint resolves all system entities
to local copies. No problem, for example:
**********
%:~/docbook-testdocs-1.1/tests> xmllint --noout --nonet --valid --catalogs book.001.xml
**********
Produces no output, indicating that the referenced dtd was found and the
document is valid (using the SGML_CATALOG_FILES environment variable).
Additionally, if I am reading the output of xmlcatalog correctly, it
indicates that the /etc/xml/catalog file maps the docbook 4.1.2
dtd to a local copy:
**********
%:/etc/xml> xmlcatalog --shell -v /etc/xml/catalog
system http://www.oasis-open.org/docbook/xm...2/docbookx.dtd Resolve sysID http://www.oasis-open.org/docbook/xm...2/docbookx.dtd
16384 Parsing catalog /etc/xml/catalog
/etc/xml/catalog added to file hash
Using rewriting rule http://www.oasis-open.org/docbook/xml/4.1.2/
/usr/share/xml/docbook/xml-dtd-4.1.2/docbookx.dtd exit
Catalogs cleanup
Free catalog entry http://www.oasis-open.org/docbook/xml/4.2/
Free catalog entry http://www.oasis-open.org/docbook/xml/4.1.2/
Free catalog entry http://docbook.sourceforge.net/release/xsl/current/
Free catalog entry /etc/xml/catalog
Free catalog entry
********** (what does all this "Free catalog . . ." mean?)
But xmllint, when using just XML Catalogs (no --catalogs option),
complains it cannot find the local docbook 4.1.2 dtd.
**********
%:~/docbook-testdocs-1.1/tests> xmllint --noout --nonet --valid book.001.xml
Attempt to load network entity http://www.oasis-open.org/docbook/xm...2/docbookx.dtd
book.001.xml:7: validity error: No declaration for attribute id of element book
<book id="book"> . . . [snip]
..
..
..
[more validity errors related to the same document]
**********
xmllint can find the local copies for the docbook 4.2 dtd, but not the
local docbook 4.1.2 dtd. However, I see no difference in their entries
in the catalog file. For reference if necessary, exact /etc/xml/catalog
file contents:
**********
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "/etc/xml/xml-catalog-dtds/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog ">
<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/" rewritePrefix="/usr/share/xml/docbook/xml-dtd-4.2/"/>
<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.1.2/"
rewritePrefix="/usr/share/xml/docbook/xml-dtd-4.1.2/"/>
<rewriteSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/current/"
rewritePrefix="/usr/share/xml/docbook/xsl-stylesheets-1.64-1"/>
</catalog>
**********
XML Catalogs is taking way too much time to set up. Help please.
Thanks,
Steve Whitlatch
sw******@getnet.net