1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/docbook-xsl/hotfix.patch
3 # Copyright (C) 2023 - 2024 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 Submitted By: Bruce Dubbs <bdubbs at linuxfromscratch dot org>
16 Initial Package Version: 1.78.1
17 Upstream Status: Unsure
18 Origin: Peter De Wachter <pdewacht@gmail.com>
19 Description: use EXSLT "replace" function when available
20 A recursive implementation of string.subst is problematic,
21 long strings with many matches will cause stack overflows.
22 Author: Peter De Wachter <pdewacht@gmail.com>
23 Bug-Debian: https://bugs.debian.org/750593
25 Rediffed for 1.79.2 by Bruce Dubbs
27 diff -Naur docbook-xsl-1.79.2.orig/lib/lib.xsl docbook-xsl-1.79.2/lib/lib.xsl
28 --- docbook-xsl-1.79.2.orig/lib/lib.xsl 2016-12-09 16:41:39.000000000 -0600
29 +++ docbook-xsl-1.79.2/lib/lib.xsl 2018-01-01 12:54:52.507332514 -0600
32 This module implements DTD-independent functions
34 - ******************************************************************** --><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
35 + ******************************************************************** -->
36 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
37 + xmlns:str="http://exslt.org/strings"
38 + exclude-result-prefixes="str"
41 <xsl:template name="dot.count">
42 <!-- Returns the number of "." characters in a string -->
44 <xsl:param name="replacement"/>
47 + <xsl:when test="function-available('str:replace')">
48 + <xsl:value-of select="str:replace($string, string($target), string($replacement))"/>
50 <xsl:when test="contains($string, $target)">
51 <xsl:variable name="rest">
52 <xsl:call-template name="string.subst">
53 --- docbook-xsl-1.79.2/catalog.xml.vanilla 2024-05-17 17:39:01.718000000 +0200
54 +++ docbook-xsl-1.79.2/catalog.xml 2024-05-17 17:40:16.383000000 +0200
56 <?xml version="1.0" encoding="utf-8"?>
57 <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
58 <!-- XML Catalog file for DocBook XSL Stylesheets v1.79.2 -->
59 + <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="./"/>
60 + <rewriteSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="./"/>
61 <rewriteURI uriStartString="http://cdn.docbook.org/release/xsl/current/" rewritePrefix="./"/>
62 <rewriteSystem systemIdStartString="http://cdn.docbook.org/release/xsl/current/" rewritePrefix="./"/>
63 <rewriteURI uriStartString="http://cdn.docbook.org/release/xsl/1.79.2/" rewritePrefix="./"/>