1 ;; Id: patch-db2latex-xsltproc-title-bug,v 1.2 2007/01/12 22:24:20 sra Exp
3 ;; This patches around a problem that I don't completely understand,
4 ;; and which may in fact be an xsltproc bug rather than a db2latex
5 ;; bug. Symptom is that the generated \title{} contains not only the
6 ;; book title but also the concatenation of all the chapter titles.
7 ;; This makes no sense, it doesn't happen with saxon, it doesn't
8 ;; happen with all versions of xsltproc, and attempts to trace this
9 ;; with --verbose and <xsl:message/> leave me more wondering whether
10 ;; it's me or xsltproc that doesn't understand the XSLT pattern
13 ;; All that said, the change below prevents the bad behavior and
14 ;; should be completely harmless, so it will do as a workaround.
16 Index: xsl/book-article.mod.xsl
17 --- xsl/book-article.mod.xsl.~1~ Tue May 3 21:51:18 2005
18 +++ xsl/book-article.mod.xsl Sat May 7 09:00:26 2005
20 <xsl:call-template name="generate.latex.book.preamble"/>
21 <!-- book:2: output title information -->
22 <xsl:text>\title{</xsl:text>
23 - <xsl:apply-templates select="title|bookinfo/title"/>
24 - <xsl:apply-templates select="subtitle|bookinfo/subtitle"/>
25 + <xsl:apply-templates select="/book/title|/book/bookinfo/title"/>
26 + <xsl:apply-templates select="/book/subtitle|/book/bookinfo/subtitle"/>
27 <xsl:text>} </xsl:text>
28 <!-- book:3: output author information -->
29 <xsl:text>\author{</xsl:text>