Subject: pkg/19890: catalog file of docbook-xml package not suitable for xsltproc
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/17/2003 16:30:11
>Number:         19890
>Category:       pkg
>Synopsis:       catalog file of docbook-xml package not suitable for xsltproc
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 17 07:35:01 PST 2003
>Originator:     Joachim Koenig-Baltes
>Release:        NetBSD 1.6L
System: NetBSD compaq 1.6L NetBSD 1.6L (JOACHIM_ISDN) #0: Wed Jan 8 22:25:08 CET 2003 joachim@compaq:/usr/src/sys/arch/i386/compile/JOACHIM_ISDN i386
Architecture: i386
Machine: i386
The docbook-xml package installs a catalog file for the public identifiers
by only grepping the lines beginning with "PUBLIC" from a catalog file
distributed with the xml version of the docbook dtd. This omits the system
identifiers, needed by some processing tools to get from the public to the
local identifiers.

take the following test document as test.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"

<book lang="en" id="test">
  <title>Small docbook test doc</title>

  <chapter id="intro">

      This document demonstrates a problem of the docbook xml catalog file
      installed by the docbook-xml package of the netbsd package system,
      together with the docbook xsl stylesheeets and xsltproc.


and try to use xsltproc from textproc/libxslt together with the docbook-xsl
style sheets to produce a formatting object file (for later transformation
to pdf with xmltex/passivetex):

    % xsltproc --catalogs /usr/pkg/share/xsl/docbook/fo/docbook.xsl test.xml >
    test.xml:4: warning: failed to load external entity "/usr/pkg/share/xml/docbook/PUBLIC"
    Making portrait pages on USletter paper (8.5inx11in)

apply the following patch to textproc/docbook-xml/Makefile:
--- Makefile.orig       Mon Jan 13 09:38:15 2003
+++ Makefile    Fri Jan 17 16:26:20 2003
@@ -21,8 +21,7 @@
                dbnotnx.mod dbpoolx.mod docbookx.dtd soextblx.dtd
-       ${GREP} '^PUBLIC' ${WRKSRC}/ > ${WRKSRC}/catalog.docbook
+NO_BUILD=      #
@@ -32,7 +31,7 @@
        (cd ${WRKSRC};     ${INSTALL_DATA} ${MISCFILES} ${DTDDIR})
        ${PREFIX}/bin/xmlcatmgr -c ${PREFIX}/share/xml/catalog \
                add "CATALOG" "${PREFIX}/share/xml/docbook/catalog"
-       ${INSTALL_DATA} ${WRKSRC}/catalog.docbook ${DTDDIR}/catalog
+       ${INSTALL_DATA} ${WRKSRC}/ ${DTDDIR}/catalog
 .include "../../textproc/xmlcatmgr/"
 .include "../../mk/"