File: patch-db2latex-xsltproc-title-bug

package info (click to toggle)
bind9 1:9.9.5.dfsg-9
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 42,976 kB
  • sloc: ansic: 313,014; sh: 53,890; cpp: 19,217; xml: 18,756; perl: 6,769; makefile: 5,043; tcl: 842; awk: 236; python: 129
file content (29 lines) | stat: -rw-r--r-- 1,457 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;; $Id: patch-db2latex-xsltproc-title-bug,v 1.2 2007/01/12 22:24:20 sra Exp $
;; 
;; This patches around a problem that I don't completely understand,
;; and which may in fact be an xsltproc bug rather than a db2latex
;; bug.  Symptom is that the generated \title{} contains not only the
;; book title but also the concatenation of all the chapter titles.
;; This makes no sense, it doesn't happen with saxon, it doesn't
;; happen with all versions of xsltproc, and attempts to trace this
;; with --verbose and <xsl:message/> leave me more wondering whether
;; it's me or xsltproc that doesn't understand the XSLT pattern
;; matching rules.
;; 
;; All that said, the change below prevents the bad behavior and
;; should be completely harmless, so it will do as a workaround.

Index: xsl/book-article.mod.xsl
--- xsl/book-article.mod.xsl.~1~	Tue May  3 21:51:18 2005
+++ xsl/book-article.mod.xsl	Sat May  7 09:00:26 2005
@@ -87,8 +87,8 @@
 		<xsl:call-template name="generate.latex.book.preamble"/>
 		<!-- book:2: output title information     -->
 		<xsl:text>\title{</xsl:text>
-			<xsl:apply-templates select="title|bookinfo/title"/>
-			<xsl:apply-templates select="subtitle|bookinfo/subtitle"/>
+			<xsl:apply-templates select="/book/title|/book/bookinfo/title"/>
+			<xsl:apply-templates select="/book/subtitle|/book/bookinfo/subtitle"/>
 		<xsl:text>}&#10;</xsl:text>
 		<!-- book:3: output author information     -->
 		<xsl:text>\author{</xsl:text>