[exim-cvs] Use public http: URLs for XSL includes.

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Exim Git Commits Mailing List
Data:  
Para: exim-cvs
Asunto: [exim-cvs] Use public http: URLs for XSL includes.
Gitweb: http://git.exim.org/exim.git/commitdiff/f6bde1c8731b1a066eea1f04cf5431dbb0ac70e0
Commit:     f6bde1c8731b1a066eea1f04cf5431dbb0ac70e0
Parent:     94a18f283972b276150cdf72fef47e56512c11d7
Author:     Phil Pennock <pdp@???>
AuthorDate: Mon Jul 5 20:31:07 2010 -0700
Committer:  Phil Pennock <pdp@???>
CommitDate: Sun Sep 5 18:46:31 2010 -0400


    Use public http: URLs for XSL includes.


    Adjust OS-Fixups, document how this works in HowItWorks.txt
---
 doc/doc-docbook/HowItWorks.txt           |   43 +++++++++++++++++++++++++++--
 doc/doc-docbook/MyStyle-chunk-html.xsl   |    2 +-
 doc/doc-docbook/MyStyle-filter-fo.xsl    |    2 +-
 doc/doc-docbook/MyStyle-nochunk-html.xsl |    2 +-
 doc/doc-docbook/MyStyle-spec-fo.xsl      |    2 +-
 doc/doc-docbook/MyStyle-txt-html.xsl     |    2 +-
 doc/doc-docbook/OS-Fixups                |    8 +++---
 7 files changed, 49 insertions(+), 12 deletions(-)


diff --git a/doc/doc-docbook/HowItWorks.txt b/doc/doc-docbook/HowItWorks.txt
index fe99ff6..718faff 100644
--- a/doc/doc-docbook/HowItWorks.txt
+++ b/doc/doc-docbook/HowItWorks.txt
@@ -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
diff --git a/doc/doc-docbook/MyStyle-chunk-html.xsl b/doc/doc-docbook/MyStyle-chunk-html.xsl
index 0c610cd..85ee8fe 100644
--- a/doc/doc-docbook/MyStyle-chunk-html.xsl
+++ b/doc/doc-docbook/MyStyle-chunk-html.xsl
@@ -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"/>


diff --git a/doc/doc-docbook/MyStyle-filter-fo.xsl b/doc/doc-docbook/MyStyle-filter-fo.xsl
index 6261f69..7b49ef1 100644
--- a/doc/doc-docbook/MyStyle-filter-fo.xsl
+++ b/doc/doc-docbook/MyStyle-filter-fo.xsl
@@ -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"/>

diff --git a/doc/doc-docbook/MyStyle-nochunk-html.xsl b/doc/doc-docbook/MyStyle-nochunk-html.xsl
index 64d5ec0..560d337 100644
--- a/doc/doc-docbook/MyStyle-nochunk-html.xsl
+++ b/doc/doc-docbook/MyStyle-nochunk-html.xsl
@@ -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>
diff --git a/doc/doc-docbook/MyStyle-spec-fo.xsl b/doc/doc-docbook/MyStyle-spec-fo.xsl
index abbbd1c..832cedc 100644
--- a/doc/doc-docbook/MyStyle-spec-fo.xsl
+++ b/doc/doc-docbook/MyStyle-spec-fo.xsl
@@ -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"/>

diff --git a/doc/doc-docbook/MyStyle-txt-html.xsl b/doc/doc-docbook/MyStyle-txt-html.xsl
index e623862..02ce745 100644
--- a/doc/doc-docbook/MyStyle-txt-html.xsl
+++ b/doc/doc-docbook/MyStyle-txt-html.xsl
@@ -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">
diff --git a/doc/doc-docbook/OS-Fixups b/doc/doc-docbook/OS-Fixups
index baae4fb..baefbb7 100755
--- a/doc/doc-docbook/OS-Fixups
+++ b/doc/doc-docbook/OS-Fixups
@@ -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"};