trying to get HEAD building again. If you want the code
[samba.git] / docs / docbook / xslt / db2latex / part-chap-app.mod.xsl
1 <?xml version='1.0'?>
2 <!--############################################################################# 
3 |- #############################################################################
4 |                                                                                                               
5 |   PURPOSE: Part
6 + ############################################################################## -->
7
8 <xsl:stylesheet 
9     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10     xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
11     exclude-result-prefixes="doc" version='1.0'>
12
13
14     <!--############################################################################# -->
15     <!-- DOCUMENTATION                                                                -->
16     <doc:reference id="part-chap-app" xmlns="">
17         <referenceinfo>
18             <releaseinfo role="meta">
19             </releaseinfo>
20         <authorgroup>
21             <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
22             <author> <firstname>James</firstname> <surname>Devenish</surname> </author>
23         </authorgroup>
24             <copyright>
25                 <year>2000</year> <year>2001</year> <year>2002</year> <year>2003</year>
26                 <holder>Ramon Casellas</holder>
27             </copyright>
28         </referenceinfo>
29         <title>Parts, Chapters and Appendixes <filename>part-chap-app.mod.xsl</filename></title>
30         <partintro>
31             <section><title>Introduction</title>
32                 <para></para>
33             </section>
34         </partintro>
35     </doc:reference>
36     <!--############################################################################# -->
37
38
39
40
41     <xsl:template match="part">
42         <xsl:call-template name="map.begin"/>
43         <xsl:apply-templates/>
44     </xsl:template>
45
46     <xsl:template match="part/docinfo"/>
47     <xsl:template match="part/title"/>
48     <xsl:template match="part/subtitle"/>
49     <xsl:template match="partintro"/>
50     <xsl:template match="partintro/title"/>
51     <xsl:template match="partintro/subtitle"/>
52     <xsl:template match="partintro/titleabbrev"/>
53
54
55     <!--############################################################################# 
56     |- #############################################################################
57     |                                                                                                           
58     |   PURPOSE: Chapter
59     + ############################################################################## -->
60
61
62     <!--############################################################################# -->
63     <!-- DOCUMENTATION                                                                -->
64     <doc:template match="chapter" xmlns="">
65         <refpurpose> XSL template for Chapters.</refpurpose>
66         <refdescription>
67             <para> This is the main entry point for a <sgmltag class="start">chapter</sgmltag> subtree.
68                 This template processes any chapter. Outputs <literal>\chapter{title}</literal>, calls 
69                 templates and apply-templates. Since chapters only apply in books, 
70                 some assumptions could be done in order to optimize the stylesheet behaviour.</para>
71
72             <formalpara><title>Remarks and Bugs</title>
73                 <itemizedlist>
74                     <listitem><para> 
75                         EMPTY templates: chapter/title, 
76                         chapter/titleabbrev, 
77                         chapter/subtitle, 
78                         chapter/docinfo|chapterinfo.</para></listitem>
79                 </itemizedlist>
80             </formalpara>
81
82             <formalpara><title>Affected by</title> map. 
83             </formalpara>
84         </refdescription>
85     </doc:template>
86     <!--############################################################################# -->
87
88     <xsl:template match="chapter">
89         <xsl:call-template name="map.begin"/>
90         <xsl:apply-templates/>
91         <xsl:call-template name="map.end"/>
92     </xsl:template>
93
94     <xsl:template match="chapter/title"/>
95     <xsl:template match="chapter/titleabbrev"/>
96     <xsl:template match="chapter/subtitle"/>
97     <xsl:template match="chapter/docinfo|chapterinfo"/>
98
99
100     <!--############################################################################# 
101     |- #############################################################################
102     |                                                                                                           
103     |   PURPOSE:
104     + ############################################################################## -->
105
106     <xsl:template match="appendix">
107         <xsl:if test="not (preceding-sibling::appendix)">
108             <xsl:text>&#10;</xsl:text>
109             <xsl:choose>
110                 <xsl:when test="local-name(..)='book' or local-name(..)='part'">
111                     <xsl:text>\newcommand{\dbappendix}[1]{\chapter{#1}}%&#10;</xsl:text>
112                 </xsl:when>
113                 <xsl:otherwise>
114                     <xsl:text>\newcommand{\dbappendix}[1]{\section{#1}}%&#10;</xsl:text>
115                 </xsl:otherwise>
116             </xsl:choose>
117             <xsl:call-template name="map.begin">
118                 <xsl:with-param name="keyword">appendixes</xsl:with-param>
119             </xsl:call-template>
120         </xsl:if>
121         <xsl:call-template name="map.begin"/>
122         <xsl:apply-templates/>
123         <xsl:call-template name="map.end"/>
124     </xsl:template>
125
126
127     <xsl:template match="appendix/title"/>
128     <xsl:template match="appendix/titleabbrev"/>
129     <xsl:template match="appendix/subtitle"/>
130     <xsl:template match="appendix/docinfo|appendixinfo"/>
131 </xsl:stylesheet>
132