Re: conglomerate and cannot parse (null)html/docbook.xsl

Dave Malcolm <[email protected]> Wed, 20 Apr 2005 23:46:47 -0400
Newsgroups gmane.editors.conglomerate.general
Message-ID <[email protected]>
On Wed, 2005-04-20 at 16:09, Jeremy C. Reed wrote:
> I installed conglomerate 0.9.0 using Pkgsrc under Linux and NetBSD.
> 
> I am unable to export to PDF or HTML. (It seems I had same problem before,
> but never figured it out.)

First of all, PDF export doesn't work yet (someone needs to finish
xmlroff or get Conglomerate talking to apache Fop)

HTML export should work however.

Conglomerate tries to locate a local copy of Norman Walsh's stylesheets
for DocBook conversion. Here's the relevant code (from
src/cong-stylesheet.c):

gchar*
cong_utils_get_norman_walsh_stylesheet_path(void)
{
       /* This should be changed if another catalog is in use, i guess
*/
       xmlChar *resolved_path = NULL;

       resolved_path = xmlCatalogResolveURI ((const
xmlChar*)"http://docbook.sourceforge.net/release/xsl/current/");

       g_message ("Norman Walsh XSL path: %s", resolved_path);

       return cong_util_dup_and_free_xml_string (resolved_path);
}


Conglomerate is trying to resolve:
http://docbook.sourceforge.net/release/xsl/current/

On my FC2 system /etc/xml/catalog maps that URI to a local copy at:
/usr/share/sgml/docbook/xsl-stylesheets-1.65.1-1/

with lines like this:
  <rewriteSystem
systemIdStartString="http://docbook.sourceforge.net/release/xsl/1.65.1"
rewritePrefix="file:///usr/share/sgml/docbook/xsl-stylesheets-1.65.1-1"/>
  <rewriteURI
uriStartString="http://docbook.sourceforge.net/release/xsl/1.65.1"
rewritePrefix="file:///usr/share/sgml/docbook/xsl-stylesheets-1.65.1-1"/>
  <rewriteSystem
systemIdStartString="http://docbook.sourceforge.net/release/xsl/current"
rewritePrefix="file:///usr/share/sgml/docbook/xsl-stylesheets-1.65.1-1"/>
  <rewriteURI
uriStartString="http://docbook.sourceforge.net/release/xsl/current"
rewritePrefix="file:///usr/share/sgml/docbook/xsl-stylesheets-1.65.1-1"/>

and this directory is provided by the docbook-style-xsl package.

Looks to me like NetBSD's packages ought to install a catalog entry to
map that URI prefix to the local copy; the code definitely works on
Fedora, and I believe it works on Debian, SuSE, and Fink.

You may be able to fix things manually by running the "xmlcatalog"
command; "man xmlcatalog" might be a good place to look.

Does this help?

> 
> Example session below is create new document, then choose to export as
> HTML:
> 
> $ XML_DEBUG_CATALOG=1 conglomerate
> ** Message: Trying to load DTD with PUBLIC "-//OASIS//DTD DocBook XML
> V4.1.2//EN" SYSTEM
> "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
> Resolve: pubID -//OASIS//DTD DocBook XML V4.1.2//EN sysID
> http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
> 0 Parsing catalog /usr/pkg/etc/xml/catalog
> /usr/pkg/etc/xml/catalog added to file hash
> /usr/pkg/share/xml/catalog not found in file hash
> 0 Parsing catalog /usr/pkg/share/xml/catalog
> /usr/pkg/share/xml/catalog added to file hash
> /usr/pkg/share/xml/docbook/catalog not found in file hash
> 0 Parsing catalog /usr/pkg/share/xml/docbook/catalog
> /usr/pkg/share/xml/docbook/catalog added to file hash
> Found public match -//OASIS//DTD DocBook XML V4.1.2//EN
> ** Message: Succeeded
> ** Message: Found display spec based on matching public ID of DTD:
>     -//OASIS//DTD DocBook XML V4.1.2//EN
> 
> ** Message: Exporter invoked: "Export DocBook as HTML" to
> "file:///home/reed/tmp/abc.html"
> ** Message: html_exporter_action_callback
> Resolve URI http://docbook.sourceforge.net/release/xsl/current/
> /usr/pkg/share/xsl/docbook/catalog not found in file hash
> 0 Parsing catalog /usr/pkg/share/xsl/docbook/catalog
> /usr/pkg/share/xsl/docbook/catalog added to file hash
> ** Message: Norman Walsh XSL path: (null)
> Resolve: sysID (null)html/docbook.xsl
> Resolve URI (null)html/docbook.xsl
> I/O warning : failed to load external entity "(null)html/docbook.xsl"
> error
> xsltParseStylesheetFile : cannot parse (null)html/docbook.xsl
> 
> 
> I do have docbook-xsl-1.68.1nb1 installed which provides
> 
> /usr/pkg/share/xsl/docbook/fo/docbook.xsl
> /usr/pkg/share/xsl/docbook/html/docbook.xsl
> 
> 
> I had same problem when trying to export as PDF:
> 
> ** Message: Exporter invoked: "Export DocBook as PDF" to
> "file:///home/reed/book
> test.pdf"
> ** Message: pdf_exporter_action_callback
> Resolve URI http://docbook.sourceforge.net/release/xsl/current/
> /usr/pkg/share/xsl/docbook/catalog not found in file hash
> 0 Parsing catalog /usr/pkg/share/xsl/docbook/catalog
> /usr/pkg/share/xsl/docbook/catalog added to file hash
> ** Message: Norman Walsh XSL path: (null)
> Resolve: sysID (null)fo/docbook.xsl
> Resolve URI (null)fo/docbook.xsl
> I/O warning : failed to load external entity "(null)fo/docbook.xsl"
> error
> xsltParseStylesheetFile : cannot parse (null)fo/docbook.xsl
> 
> 
> The Pop-up window says: "... it is possible that your XML catalog file
> is set up incorrectly. See http://www.xmlsoft.org/catalog.html for
> more information on catalogs."
> 
> I am beginning to read the above referenced webpage.
> 
> But I am unsure what this all means.
> 
> Should the package tools be adding entries to this catalog on
> package installation?
> 
> And why is it (null)? I assume this is an empty setting.
> 
> Any ideas on how I can troubleshoot this further?
> 
> Thank you,
> 
>  Jeremy C. Reed
> 
> 
> 
> 
> _______________________________________________
> Conglomerate mailing list
> [email protected]
> http://lists.copyleft.no/mailman/listinfo/conglomerate
--