Debian Codegraph @

xsl/appendix.xsl

raw
1 <?xml version='1.0'?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
3
4 <!--############################################################################
5 XSLT Stylesheet DocBook -> LaTeX
6 ############################################################################ -->
7
8 <xsl:template match="appendix">
9 <xsl:if test="not (preceding-sibling::appendix)">
10 <xsl:text>% ---------------------&#10;</xsl:text>
11 <xsl:text>% Appendixes start here&#10;</xsl:text>
12 <xsl:text>% ---------------------&#10;</xsl:text>
13 <xsl:text>\begin{appendices}&#10;</xsl:text>
14 </xsl:if>
15 <xsl:call-template name="makeheading">
16 <!-- raise to the highest existing book section level (part or chapter) -->
17 <xsl:with-param name="level">
18 <xsl:choose>
19 <xsl:when test="preceding-sibling::part or
20 following-sibling::part">-1</xsl:when>
21 <xsl:when test="parent::book or parent::part">0</xsl:when>
22 <xsl:otherwise>1</xsl:otherwise>
23 </xsl:choose>
24 </xsl:with-param>
25 </xsl:call-template>
26
27 <xsl:apply-templates/>
28
29 <xsl:if test="not (following-sibling::appendix)">
30 <xsl:text>&#10;\end{appendices}&#10;</xsl:text>
31 </xsl:if>
32 </xsl:template>
33
34 <xsl:template match="appendix/title"></xsl:template>
35 <xsl:template match="appendix/titleabbrev"></xsl:template>
36 <xsl:template match="appendix/subtitle"></xsl:template>
37 <xsl:template match="appendix/docinfo|appendixinfo"></xsl:template>
38
39 </xsl:stylesheet>
40