Why not use the xml catalog in Linux?

Philipp Thomas <[email protected]>
Newsgroups gmane.comp.lib.boost.documentation
Organization SUSE LINUX Products GmbH, G F: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg)
Message-ID <[email protected]>
Trying to build the boost documentation on openSUSE fails because the
stylesheets are in /usr/share/xml/docbook/stylesheet/nwalsh/current (a
symlink to the current version) and not in
/usr/share/xml/docbook/stylesheet/nwalsh where boost.book searches. This
begs the question why you check that at all on Linux. All standard stylesheets and
dtds can be found via the catalog so /etc/xml/catalog is the only thing that
needs to be referenced besides the boost.book specific stuff.

Being not very familiar with JAM (boost is the only package I maintain for
SLES/openSUSE that uses it), how would I have to change boostbook.jam in
order to conditionally not use docbook-xsl-dir and docbook-dtd-dir?

Currently I simply use the attached patch for boostbook.jam but that doesn't
make it conditional on OS.

Philipp

_______________________________________________
Boost-docs mailing list
[email protected]
http://lists.boost.org/mailman/listinfo.cgi/boost-docs
boost-use_std_xml_catalog.patch (text/x-patch, 2.2 KB)
Index: tools/build/v2/tools/boostbook.jam
===================================================================
--- tools/build/v2/tools/boostbook.jam.orig	2011-06-06 22:36:21.000000000 +0200
+++ tools/build/v2/tools/boostbook.jam	2012-02-29 09:10:31.362992417 +0100
@@ -491,40 +491,7 @@ rule generate-xml-catalog ( target : sou
     "  <rewriteURI uriStartString=\"http://www.boost.org/tools/boostbook/dtd/\" rewritePrefix=\"file://$(boostbook-dtd-dir)/\"/>"
     : true ;
 
-  local docbook-xsl-dir = [ boostbook.docbook-xsl-dir ] ;    
-  if ! $(docbook-xsl-dir) 
-  {
-    ECHO "BoostBook warning: no DocBook XSL directory specified." ;
-    ECHO "  If you have the DocBook XSL stylesheets installed, please " ;
-    ECHO "  set DOCBOOK_XSL_DIR to the stylesheet directory on either " ;
-    ECHO "  the command line (via -sDOCBOOK_XSL_DIR=...) or in a " ;
-    ECHO "  Boost.Jam configuration file. The DocBook XSL stylesheets " ;
-    ECHO "  are available here: http://docbook.sourceforge.net/ " ;
-    ECHO "  Stylesheets will be downloaded on-the-fly (very slow!) " ;
-  }
-  else 
-  {
-    docbook-xsl-dir = [ format-catalog-path $(docbook-xsl-dir) ] ;      
-    print.text "  <rewriteURI uriStartString=\"http://docbook.sourceforge.net/release/xsl/current/\" rewritePrefix=\"file://$(docbook-xsl-dir)/\"/>" ;
-  }
-
-  local docbook-dtd-dir = [ boostbook.docbook-dtd-dir ] ;  
-  if ! $(docbook-dtd-dir)
-  {
-    ECHO "BoostBook warning: no DocBook DTD directory specified." ;
-    ECHO "  If you have the DocBook DTD installed, please set " ;
-    ECHO "  DOCBOOK_DTD_DIR to the DTD directory on either " ;
-    ECHO "  the command line (via -sDOCBOOK_DTD_DIR=...) or in a " ;
-    ECHO "  Boost.Jam configuration file. The DocBook DTD is available " ;
-    ECHO "  here: http://www.oasis-open.org/docbook/xml/4.2/index.shtml" ;
-    ECHO "  The DTD will be downloaded on-the-fly (very slow!) " ;
-  }
-  else 
-  {
-    docbook-dtd-dir = [ format-catalog-path $(docbook-dtd-dir) ] ;      
-    print.text "  <rewriteURI uriStartString=\"http://www.oasis-open.org/docbook/xml/4.2/\" rewritePrefix=\"file://$(docbook-dtd-dir)/\"/>" ;
-  }
-
+  print.text " <nextCatalog catalog=\"file:///etc/xml/catalog\"/> " ;
   print.text "</catalog>" ;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.