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 + ############################################################################## -->
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'>
14 <doc:reference id="part-chap-app" xmlns="">
16 <releaseinfo role="meta">
17 $Id: part-chap-app.mod.xsl,v 1.7 2004/01/18 11:56:29 j-devenish Exp $
24 <year>2000</year><year>2001</year><year>2002</year><year>2003</year><year>2004</year>
25 <holder>Ramon Casellas</holder>
28 <doc:revision rcasver="1.4">&rev_2003_05;</doc:revision>
31 <title>Parts, Chapters and Appendixes <filename>part-chap-app.mod.xsl</filename></title>
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>
45 Invokes the mapping templates and applies content templates.
53 <listitem><simpara>&mapping;</simpara></listitem>
54 <listitem><simpara><xref linkend="template.content-templates"/></simpara></listitem>
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"/>
65 <doc:template match="chapter" xmlns="">
66 <refpurpose> XSL template for Chapters.</refpurpose>
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>
73 <formalpara><title>Remarks and Bugs</title>
76 EMPTY templates: chapter/title,
79 chapter/docinfo|chapterinfo.</para></listitem>
83 <formalpara><title>Affected by</title> map.
89 <doc:template xmlns="">
90 <refpurpose>Process <doc:db>appendix</doc:db> elements</refpurpose>
101 For each appendix, mappings are used and content templates are
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>
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>
122 <listitem><simpara>&mapping;</simpara></listitem>
123 <listitem><simpara><xref linkend="template.content-templates"/></simpara></listitem>
127 <xsl:template match="appendix">
128 <xsl:if test="not (preceding-sibling::appendix)">
129 <xsl:text> </xsl:text>
131 <xsl:when test="local-name(..)='book' or local-name(..)='part'">
132 <xsl:text>\newcommand{\dbappendix}[1]{\chapter{#1}}% </xsl:text>
133 <xsl:call-template name="map.begin">
134 <xsl:with-param name="keyword">appendices-chapter</xsl:with-param>
138 <xsl:text>\newcommand{\dbappendix}[1]{\section{#1}}% </xsl:text>
139 <xsl:call-template name="map.begin">
140 <xsl:with-param name="keyword">appendices-section</xsl:with-param>
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> </xsl:text>
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>
157 <xsl:call-template name="map.end">
158 <xsl:with-param name="keyword">appendices-section</xsl:with-param>
162 <xsl:text> </xsl:text>