~qbalazs/installation-guide/lp1030336

« back to all changes in this revision

Viewing changes to build/stylesheets/db2latex/part-chap-app.mod.xsl

  • Committer: joeyh
  • Date: 2005-10-07 19:51:38 UTC
  • Revision ID: vcs-imports@canonical.com-20051007195138-c3d57b2617a79a4f
move manual to top-level directory, split out of debian-installer package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version='1.0'?>
 
2
<!DOCTYPE xsl:stylesheet [ <!ENTITY % xsldoc.ent SYSTEM "./xsldoc.ent"> %xsldoc.ent; ]>
 
3
<!--############################################################################# 
 
4
|       $Id: part-chap-app.mod.xsl,v 1.7 2004/01/18 11:56:29 j-devenish Exp $
 
5
|- #############################################################################
 
6
|       $Author: j-devenish $
 
7
+ ############################################################################## -->
 
8
 
 
9
<xsl:stylesheet
 
10
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 
11
        xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
 
12
        exclude-result-prefixes="doc" version='1.0'>
 
13
 
 
14
        <doc:reference id="part-chap-app" xmlns="">
 
15
                <referenceinfo>
 
16
                        <releaseinfo role="meta">
 
17
                                $Id: part-chap-app.mod.xsl,v 1.7 2004/01/18 11:56:29 j-devenish Exp $
 
18
                        </releaseinfo>
 
19
                        <authorgroup>
 
20
                                &ramon;
 
21
                                &james;
 
22
                        </authorgroup>
 
23
                        <copyright>
 
24
                                <year>2000</year><year>2001</year><year>2002</year><year>2003</year><year>2004</year>
 
25
                                <holder>Ramon Casellas</holder>
 
26
                        </copyright>
 
27
                        <revhistory>
 
28
                                <doc:revision rcasver="1.4">&rev_2003_05;</doc:revision>
 
29
                        </revhistory>
 
30
                </referenceinfo>
 
31
                <title>Parts, Chapters and Appendixes <filename>part-chap-app.mod.xsl</filename></title>
 
32
                <partintro>
 
33
                        <para>
 
34
                        
 
35
                        
 
36
                        
 
37
                        </para>
 
38
                </partintro>
 
39
        </doc:reference>
 
40
 
 
41
        <doc:template xmlns="">
 
42
                <refpurpose>Process <doc:db>set</doc:db>, <doc:db>part</doc:db> and <doc:db>chapter</doc:db> elements</refpurpose>
 
43
                <doc:description>
 
44
                        <para>
 
45
                                Invokes the mapping templates and applies content templates.
 
46
                        </para>
 
47
                </doc:description>
 
48
                <doc:variables>
 
49
                        &no_var;
 
50
                </doc:variables>
 
51
                <doc:seealso>
 
52
                        <itemizedlist>
 
53
                                <listitem><simpara>&mapping;</simpara></listitem>
 
54
                                <listitem><simpara><xref linkend="template.content-templates"/></simpara></listitem>
 
55
                        </itemizedlist>
 
56
                </doc:seealso>
 
57
        </doc:template>
 
58
        <xsl:template match="set|part|chapter">
 
59
                <xsl:call-template name="map.begin"/>
 
60
                <xsl:call-template name="content-templates-rootid"/>
 
61
                <xsl:call-template name="map.end"/>
 
62
        </xsl:template>
 
63
 
 
64
        <!--
 
65
    <doc:template match="chapter" xmlns="">
 
66
        <refpurpose> XSL template for Chapters.</refpurpose>
 
67
        <doc:description>
 
68
            <para> This is the main entry point for a <sgmltag class="start">chapter</sgmltag> subtree.
 
69
                This template processes any chapter. Outputs <literal>\chapter{title}</literal>, calls 
 
70
                templates and apply-templates. Since chapters only apply in books, 
 
71
                some assumptions could be done in order to optimize the stylesheet behaviour.</para>
 
72
 
 
73
            <formalpara><title>Remarks and Bugs</title>
 
74
                <itemizedlist>
 
75
                    <listitem><para> 
 
76
                        EMPTY templates: chapter/title, 
 
77
                        chapter/titleabbrev, 
 
78
                        chapter/subtitle, 
 
79
                        chapter/docinfo|chapterinfo.</para></listitem>
 
80
                </itemizedlist>
 
81
            </formalpara>
 
82
 
 
83
            <formalpara><title>Affected by</title> map. 
 
84
            </formalpara>
 
85
        </doc:description>
 
86
    </doc:template>
 
87
        -->
 
88
 
 
89
        <doc:template xmlns="">
 
90
                <refpurpose>Process <doc:db>appendix</doc:db> elements</refpurpose>
 
91
                <doc:description>
 
92
                        <para>
 
93
                                Formats appendices.
 
94
                        </para>
 
95
                </doc:description>
 
96
                <doc:variables>
 
97
                        &no_var;
 
98
                </doc:variables>
 
99
                <doc:notes>
 
100
                        <para>
 
101
                                For each appendix, mappings are used and content templates are
 
102
                                applies.
 
103
                        </para>
 
104
                        <para>
 
105
                                For <doc:db>appendix</doc:db> elements that occur as children of
 
106
                                <doc:db>book</doc:db> or <doc:db>part</doc:db>, the &LaTeX;
 
107
                                <function condition="latex">chapter</function> command will be
 
108
                                used. Otherwise, the <function condition="latex">section</function>
 
109
                                will be used.
 
110
                        </para>
 
111
                        <para>
 
112
                                If an <doc:db>appendix</doc:db> is the first, or the last, then
 
113
                                the &LaTeX; mappings for appendix-groups will be invoked in
 
114
                                addition to the mapping for the appendix itself. For
 
115
                                chapter-level appendices, the <quote>appendices-chapter</quote>
 
116
                                is used. Otherwise, the <quote>appendices-section</quote>
 
117
                                mapping is used.
 
118
                        </para>
 
119
                </doc:notes>
 
120
                <doc:seealso>
 
121
                        <itemizedlist>
 
122
                                <listitem><simpara>&mapping;</simpara></listitem>
 
123
                                <listitem><simpara><xref linkend="template.content-templates"/></simpara></listitem>
 
124
                        </itemizedlist>
 
125
                </doc:seealso>
 
126
        </doc:template>
 
127
        <xsl:template match="appendix">
 
128
                <xsl:if test="not (preceding-sibling::appendix)">
 
129
                        <xsl:text>&#10;</xsl:text>
 
130
                        <xsl:choose>
 
131
                                <xsl:when test="local-name(..)='book' or local-name(..)='part'">
 
132
                                        <xsl:text>\newcommand{\dbappendix}[1]{\chapter{#1}}%&#10;</xsl:text>
 
133
                                        <xsl:call-template name="map.begin">
 
134
                                                <xsl:with-param name="keyword">appendices-chapter</xsl:with-param>
 
135
                                        </xsl:call-template>
 
136
                                </xsl:when>
 
137
                                <xsl:otherwise>
 
138
                                        <xsl:text>\newcommand{\dbappendix}[1]{\section{#1}}%&#10;</xsl:text>
 
139
                                        <xsl:call-template name="map.begin">
 
140
                                                <xsl:with-param name="keyword">appendices-section</xsl:with-param>
 
141
                                        </xsl:call-template>
 
142
                                </xsl:otherwise>
 
143
                        </xsl:choose>
 
144
                </xsl:if>
 
145
                <xsl:call-template name="map.begin"/>
 
146
                <xsl:call-template name="content-templates"/>
 
147
                <xsl:call-template name="map.end"/>
 
148
                <xsl:if test="not (following-sibling::appendix)">
 
149
                        <xsl:text>&#10;</xsl:text>
 
150
                        <xsl:choose>
 
151
                                <xsl:when test="local-name(..)='book' or local-name(..)='part'">
 
152
                                        <xsl:call-template name="map.end">
 
153
                                                <xsl:with-param name="keyword">appendices-chapter</xsl:with-param>
 
154
                                        </xsl:call-template>
 
155
                                </xsl:when>
 
156
                                <xsl:otherwise>
 
157
                                        <xsl:call-template name="map.end">
 
158
                                                <xsl:with-param name="keyword">appendices-section</xsl:with-param>
 
159
                                        </xsl:call-template>
 
160
                                </xsl:otherwise>
 
161
                        </xsl:choose>
 
162
                        <xsl:text>&#10;</xsl:text>
 
163
                </xsl:if>
 
164
        </xsl:template>
 
165
 
 
166
</xsl:stylesheet>
 
167