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