Use public http: URLs for XSL includes.
authorPhil Pennock <pdp@spodhuis.org>
Tue, 6 Jul 2010 03:31:07 +0000 (20:31 -0700)
committerPhil Pennock <pdp@moonstone.local>
Sun, 5 Sep 2010 22:46:31 +0000 (18:46 -0400)
Adjust OS-Fixups, document how this works in HowItWorks.txt

doc/doc-docbook/HowItWorks.txt
doc/doc-docbook/MyStyle-chunk-html.xsl
doc/doc-docbook/MyStyle-filter-fo.xsl
doc/doc-docbook/MyStyle-nochunk-html.xsl
doc/doc-docbook/MyStyle-spec-fo.xsl
doc/doc-docbook/MyStyle-txt-html.xsl
doc/doc-docbook/OS-Fixups

index fe99ff6b328a7b87c75d8d09e508b5921930757a..718faff525a7cf30c05a2077c1e78dc53e38acf6 100644 (file)
@@ -137,10 +137,13 @@ at the time of writing):
   These are all installed on my box; I do not know which of libxml or libxml2
   the various scripts are actually using.
 
-. xsl-stylesheets-1.70.1
+. xsl-stylesheets-<version>
 
   These are the standard DocBook XSL stylesheets.
 
+  The documents use http://docbook.sourceforge.net/release/xsl/current/ whic
+  should be mapped to an appropriate local path via the system catalogs.
+
 . fop 0.93
 
   FOP is a processor for "formatted objects". It is written in Java. The fop
@@ -234,6 +237,39 @@ comments in these style files to explain what changes I have made. Some of the
 changes are quite significant.
 
 
+XSL INCLUDES
+
+References to XSL paths should use the public URLs, such as:
+  http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl
+If this fails to work for you, then there is a problem with your system
+catalogs.  As a work-around, you can adjust the OS-Fixups script and then:
+$ make os-fixup
+
+As an example of how this should normally work, on a FreeBSD system the
+resolution goes to /usr/local/share/xml/catalog which contains a directive:
+  <nextCatalog catalog="/usr/local/share/xml/catalog.ports" />
+to pull in the file automatically maintained by the Ports system.  That file
+will contain:
+  <delegateSystem
+   systemIdStartString="http://docbook.sourceforge.net/release/xsl/"
+   catalog="file:///usr/local/share/xsl/docbook/catalog" />
+  <delegateURI
+   uriStartString="http://docbook.sourceforge.net/release/xsl/"
+   catalog="file:///usr/local/share/xsl/docbook/catalog" />
+and that catalog file contains:
+  <rewriteSystem
+   systemIdStartString="http://docbook.sourceforge.net/release/xsl/current"
+   rewritePrefix="file:///usr/local/share/xsl/docbook" />
+  <rewriteURI
+   uriStartString="http://docbook.sourceforge.net/release/xsl/current"
+    rewritePrefix="file:///usr/local/share/xsl/docbook" />
+and the full path is thus eventually arrived at.
+
+See also the tools:
+  xmlcatalog(1) from libxml2
+  xmlcatmgr(1) for a lightweight tool written for the NetBSD Packages system.
+
+
 THE PRE-XML SCRIPT
 
 The Pre-xml script copies a .xml file, making certain changes according to the
@@ -672,5 +708,6 @@ spec.xfpt                      xfpt source of the specification document
 x2man                          Script to make the Exim man page from the XML
 
 
-Philip Hazel
-Last updated: 31 August 2007
+(Originally, and for the most part: Philip Hazel)
+The Exim Maintainers
+Last updated: 5 July 2010
index 0c610cded6488439d16487b0bfe40c5f005e1a99..85ee8fe153661b3948f170ae77a9f923cd8eaf5d 100644 (file)
@@ -7,7 +7,7 @@ section chunking). -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
 
-<xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets-1.70.1/xhtml/chunk.xsl"/>
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
 <xsl:import href="MyStyle-html.xsl"/>
 
 
index 6261f69da328fa90a65aca15bc6f5210ee6c5659..7b49ef1aa9208aa48da5c37a0b5b4d6c14f736de 100644 (file)
@@ -8,7 +8,7 @@ all forms of output. Then it imports my FO stylesheet that contains changes for
 all printed output. Finally, there are some changes that apply only when
 printing the filter document. -->
 
-<xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets-1.70.1/fo/docbook.xsl"/>
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
 <xsl:import href="MyStyle.xsl"/>
 <xsl:import href="MyStyle-fo.xsl"/>
 
index 64d5ec036718c70ca3ad72f7e1fc250b27b995a4..560d33769cf40aecaa4b43ec515efbfed69e150e 100644 (file)
@@ -5,7 +5,7 @@
 <!-- This stylesheet driver imports the DocBook XML stylesheet for unchunked
 HTML output, and then imports my common stylesheet for HTML output. -->
 
-<xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets-1.70.1/xhtml/docbook.xsl"/>
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
 <xsl:import href="MyStyle-html.xsl"/>
 
 </xsl:stylesheet>
index abbbd1c304ec19305a5b2abbe9b81c5b0c3063e2..832cedc69e879e061e2ad7b8cec28dc990254740 100644 (file)
@@ -8,7 +8,7 @@ all forms of output. Then it imports my FO stylesheet that contains changes for
 all printed output. Finally, there are some changes that apply only when
 printing the Exim specification document. -->
 
-<xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets-1.70.1/fo/docbook.xsl"/>
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
 <xsl:import href="MyStyle.xsl"/>
 <xsl:import href="MyStyle-fo.xsl"/>
 
index e62386200b1acef3abfc4607227d6184604248e8..02ce745d10a61f401009ceffb699dda6329f27de 100644 (file)
@@ -7,7 +7,7 @@ HTML output, and then imports my common stylesheet for HTML output. Then it
 adds an instruction to use "(c)" for copyright rather than the Unicode
 character. -->
 
-<xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets-1.70.1/xhtml/docbook.xsl"/>
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
 <xsl:import href="MyStyle-html.xsl"/>
 
 <xsl:template name="dingbat.characters">
index baae4fb93616082d77679a4f1dbdcb6cd42a994d..baefbb7160fdbe088e7f08da01598d96f352cb6a 100755 (executable)
@@ -2,7 +2,7 @@
 #  $Cambridge: exim/doc/doc-docbook/OS-Fixups,v 1.3 2010/05/28 15:38:18 nm4 Exp $
 use strict;
 
-# Script to hack around using absolute paths in xsl:import with fixups.
+# Script to hack around xsl:import paths; ideally, the system catalogs are used.
 # Let every OS define its own manipulations.
 # Uses the Perl $^O values to identify the current OS.
 #
@@ -11,7 +11,7 @@ use strict;
 
 sub filter_freebsd
 {
-s{"/usr/share/sgml/docbook/xsl-stylesheets-1.70.1/}
+s{"http://docbook.sourceforge.net/release/xsl/current/}
  {"/usr/local/share/xsl/docbook/};
 s{"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"}
  {"/usr/local/share/xml/docbook/4.2/docbookx.dtd"};
@@ -20,7 +20,7 @@ s{"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"}
 sub filter_linux
 {
 # SUSE 10 with extra pkgs
-s{"/usr/share/sgml/docbook/xsl-stylesheets-1.70.1/}
+s{"http://docbook.sourceforge.net/release/xsl/current/}
  {"/usr/share/xml/docbook/stylesheet/nwalsh/1.71.1/};
 s{"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"}
  {"/usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd"};
@@ -29,7 +29,7 @@ s{"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"}
 sub filter_darwin
 {
 # NB - this uses the Mac Ports installations
-s{"/usr/share/sgml/docbook/xsl-stylesheets-1.70.1/}
+s{"http://docbook.sourceforge.net/release/xsl/current/}
  {"/opt/local/share/xsl/docbook-xsl/};
 s{"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"}
  {"/opt/local/share/xml/docbook/4.2/docbookx.dtd"};