Replace deprecated luaL_openlib() by luaL_register()
[apps/madmutt.git] / xslt / xhtml / division.xsl
1 <?xml version="1.0" encoding="US-ASCII"?>
2 <!--This file was created automatically by html2xhtml-->
3 <!--from the HTML stylesheets. Do not edit this file.-->
4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
5
6 <!-- ********************************************************************
7      $Id$
8      ********************************************************************
9
10      This file is part of the XSL DocBook Stylesheet distribution.
11      See ../README or http://nwalsh.com/docbook/xsl/ for copyright
12      and other information.
13
14      ******************************************************************** -->
15
16 <!-- ==================================================================== -->
17
18 <xsl:template match="set">
19   <div class="{name(.)}">
20     <xsl:call-template name="language.attribute"/>
21     <xsl:if test="$generate.id.attributes != 0">
22       <xsl:attribute name="id">
23         <xsl:call-template name="object.id"/>
24       </xsl:attribute>
25     </xsl:if>
26
27     <xsl:call-template name="set.titlepage"/>
28
29     <xsl:call-template name="make.lots">
30       <xsl:with-param name="toc.params">
31         <xsl:call-template name="find.path.params">
32           <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
33         </xsl:call-template>
34       </xsl:with-param>
35       <xsl:with-param name="toc">
36         <xsl:call-template name="set.toc"/>
37       </xsl:with-param>
38     </xsl:call-template>
39
40     <xsl:apply-templates/>
41   </div>
42 </xsl:template>
43
44 <xsl:template match="set/setinfo"/>
45 <xsl:template match="set/title"/>
46 <xsl:template match="set/titleabbrev"/>
47 <xsl:template match="set/subtitle"/>
48
49 <!-- ==================================================================== -->
50
51 <xsl:template match="book">
52   <div class="{name(.)}">
53     <xsl:call-template name="language.attribute"/>
54     <xsl:if test="$generate.id.attributes != 0">
55       <xsl:attribute name="id">
56         <xsl:call-template name="object.id"/>
57       </xsl:attribute>
58     </xsl:if>
59
60     <xsl:call-template name="book.titlepage"/>
61
62     <xsl:apply-templates select="dedication" mode="dedication"/>
63
64     <xsl:call-template name="make.lots">
65       <xsl:with-param name="toc.params">
66         <xsl:call-template name="find.path.params">
67           <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
68         </xsl:call-template>
69       </xsl:with-param>
70       <xsl:with-param name="toc">
71         <xsl:call-template name="division.toc"/>
72       </xsl:with-param>
73     </xsl:call-template>
74
75     <xsl:apply-templates/>
76   </div>
77 </xsl:template>
78
79 <xsl:template match="book/bookinfo"/>
80 <xsl:template match="book/title"/>
81 <xsl:template match="book/titleabbrev"/>
82 <xsl:template match="book/subtitle"/>
83
84 <!-- ==================================================================== -->
85
86 <xsl:template match="part">
87   <div class="{name(.)}">
88     <xsl:call-template name="language.attribute"/>
89     <xsl:if test="$generate.id.attributes != 0">
90       <xsl:attribute name="id">
91         <xsl:call-template name="object.id"/>
92       </xsl:attribute>
93     </xsl:if>
94
95     <xsl:call-template name="part.titlepage"/>
96
97     <xsl:variable name="toc.params">
98       <xsl:call-template name="find.path.params">
99         <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
100       </xsl:call-template>
101     </xsl:variable>
102     <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
103       <xsl:call-template name="division.toc"/>
104     </xsl:if>
105     <xsl:apply-templates/>
106   </div>
107 </xsl:template>
108
109 <xsl:template match="part" mode="make.part.toc">
110   <xsl:call-template name="division.toc"/>
111 </xsl:template>
112
113 <xsl:template match="reference" mode="make.part.toc">
114   <xsl:call-template name="division.toc"/>
115 </xsl:template>
116
117 <xsl:template match="part/docinfo"/>
118 <xsl:template match="part/partinfo"/>
119 <xsl:template match="part/title"/>
120 <xsl:template match="part/titleabbrev"/>
121 <xsl:template match="part/subtitle"/>
122
123 <xsl:template match="partintro">
124   <div class="{name(.)}">
125     <xsl:call-template name="language.attribute"/>
126     <xsl:if test="$generate.id.attributes != 0">
127       <xsl:attribute name="id">
128         <xsl:call-template name="object.id"/>
129       </xsl:attribute>
130     </xsl:if>
131
132     <xsl:call-template name="partintro.titlepage"/>
133     <xsl:apply-templates/>
134
135     <xsl:variable name="toc.params">
136       <xsl:call-template name="find.path.params">
137         <xsl:with-param name="node" select="parent::*"/>
138         <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
139       </xsl:call-template>
140     </xsl:variable>
141     <xsl:if test="contains($toc.params, 'toc')">
142       <!-- not ancestor::part because partintro appears in reference -->
143       <xsl:apply-templates select="parent::*" mode="make.part.toc"/>
144     </xsl:if>
145     <xsl:call-template name="process.footnotes"/>
146   </div>
147 </xsl:template>
148
149 <xsl:template match="partintro/title"/>
150 <xsl:template match="partintro/titleabbrev"/>
151 <xsl:template match="partintro/subtitle"/>
152
153 <xsl:template match="partintro/title" mode="partintro.title.mode">
154   <h2>
155     <xsl:apply-templates/>
156   </h2>
157 </xsl:template>
158
159 <xsl:template match="partintro/subtitle" mode="partintro.title.mode">
160   <h3>
161     <i><xsl:apply-templates/></i>
162   </h3>
163 </xsl:template>
164
165 <!-- ==================================================================== -->
166
167 <xsl:template match="book" mode="division.number">
168   <xsl:number from="set" count="book" format="1."/>
169 </xsl:template>
170
171 <xsl:template match="part" mode="division.number">
172   <xsl:number from="book" count="part" format="I."/>
173 </xsl:template>
174
175 <!-- ==================================================================== -->
176
177 <xsl:template name="division.title">
178   <xsl:param name="node" select="."/>
179
180   <h1>
181     <xsl:attribute name="class">title</xsl:attribute>
182     <xsl:call-template name="anchor">
183       <xsl:with-param name="node" select="$node"/>
184       <xsl:with-param name="conditional" select="0"/>
185     </xsl:call-template>
186     <xsl:apply-templates select="$node" mode="object.title.markup">
187       <xsl:with-param name="allow-anchors" select="1"/>
188     </xsl:apply-templates>
189   </h1>
190 </xsl:template>
191
192 </xsl:stylesheet>