]> git.evergreen-ils.org Git - working/Evergreen.git/blob - stylesheets/evergreen_docbook_files/docbook-xsl-1.75.2/html/division.xsl
Add stylesheets for our evergreen docbook site.
[working/Evergreen.git] / stylesheets / evergreen_docbook_files / docbook-xsl-1.75.2 / html / division.xsl
1 <?xml version='1.0'?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3                 version='1.0'>
4
5 <!-- ********************************************************************
6      $Id: division.xsl 8421 2009-05-04 07:49:49Z bobstayton $
7      ********************************************************************
8
9      This file is part of the XSL DocBook Stylesheet distribution.
10      See ../README or http://docbook.sf.net/release/xsl/current/ for
11      copyright and other information.
12
13      ******************************************************************** -->
14
15 <!-- ==================================================================== -->
16
17 <xsl:template match="set">
18   <xsl:call-template name="id.warning"/>
19
20   <div>
21     <xsl:apply-templates select="." mode="common.html.attributes"/>
22     <xsl:call-template name="dir">
23       <xsl:with-param name="inherit" select="1"/>
24     </xsl:call-template>
25     <xsl:call-template name="language.attribute"/>
26     <xsl:if test="$generate.id.attributes != 0">
27       <xsl:attribute name="id">
28         <xsl:call-template name="object.id"/>
29       </xsl:attribute>
30     </xsl:if>
31
32     <xsl:call-template name="set.titlepage"/>
33
34     <xsl:variable name="toc.params">
35       <xsl:call-template name="find.path.params">
36         <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
37       </xsl:call-template>
38     </xsl:variable>
39
40     <xsl:call-template name="make.lots">
41       <xsl:with-param name="toc.params" select="$toc.params"/>
42       <xsl:with-param name="toc">
43         <xsl:call-template name="set.toc">
44           <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
45         </xsl:call-template>
46       </xsl:with-param>
47     </xsl:call-template>
48
49     <xsl:apply-templates/>
50   </div>
51 </xsl:template>
52
53 <xsl:template match="set/setinfo"></xsl:template>
54 <xsl:template match="set/title"></xsl:template>
55 <xsl:template match="set/titleabbrev"></xsl:template>
56 <xsl:template match="set/subtitle"></xsl:template>
57
58 <!-- ==================================================================== -->
59
60 <xsl:template match="book">
61   <xsl:call-template name="id.warning"/>
62
63   <div>
64     <xsl:apply-templates select="." mode="common.html.attributes"/>
65     <xsl:if test="$generate.id.attributes != 0">
66       <xsl:attribute name="id">
67         <xsl:call-template name="object.id"/>
68       </xsl:attribute>
69     </xsl:if>
70
71     <xsl:call-template name="book.titlepage"/>
72
73     <xsl:apply-templates select="dedication" mode="dedication"/>
74     <xsl:apply-templates select="acknowledgements" mode="acknowledgements"/>
75
76     <xsl:variable name="toc.params">
77       <xsl:call-template name="find.path.params">
78         <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
79       </xsl:call-template>
80     </xsl:variable>
81
82     <xsl:call-template name="make.lots">
83       <xsl:with-param name="toc.params" select="$toc.params"/>
84       <xsl:with-param name="toc">
85         <xsl:call-template name="division.toc">
86           <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
87         </xsl:call-template>
88       </xsl:with-param>
89     </xsl:call-template>
90
91     <xsl:apply-templates/>
92   </div>
93 </xsl:template>
94
95 <xsl:template match="book/bookinfo"></xsl:template>
96 <xsl:template match="book/info"></xsl:template>
97 <xsl:template match="book/title"></xsl:template>
98 <xsl:template match="book/titleabbrev"></xsl:template>
99 <xsl:template match="book/subtitle"></xsl:template>
100
101 <!-- ==================================================================== -->
102
103 <xsl:template match="part">
104   <xsl:call-template name="id.warning"/>
105
106   <div>
107     <xsl:apply-templates select="." mode="common.html.attributes"/>
108     <xsl:if test="$generate.id.attributes != 0">
109       <xsl:attribute name="id">
110         <xsl:call-template name="object.id"/>
111       </xsl:attribute>
112     </xsl:if>
113
114     <xsl:call-template name="part.titlepage"/>
115
116     <xsl:variable name="toc.params">
117       <xsl:call-template name="find.path.params">
118         <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
119       </xsl:call-template>
120     </xsl:variable>
121     <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
122       <xsl:call-template name="division.toc"/>
123     </xsl:if>
124     <xsl:apply-templates/>
125   </div>
126 </xsl:template>
127
128 <xsl:template match="part" mode="make.part.toc">
129   <xsl:call-template name="division.toc"/>
130 </xsl:template>
131
132 <xsl:template match="reference" mode="make.part.toc">
133   <xsl:call-template name="division.toc"/>
134 </xsl:template>
135
136 <xsl:template match="part/docinfo"></xsl:template>
137 <xsl:template match="part/partinfo"></xsl:template>
138 <xsl:template match="part/info"></xsl:template>
139 <xsl:template match="part/title"></xsl:template>
140 <xsl:template match="part/titleabbrev"></xsl:template>
141 <xsl:template match="part/subtitle"></xsl:template>
142
143 <xsl:template match="partintro">
144   <xsl:call-template name="id.warning"/>
145
146   <div>
147     <xsl:call-template name="common.html.attributes"/>
148     <xsl:if test="$generate.id.attributes != 0">
149       <xsl:attribute name="id">
150         <xsl:call-template name="object.id"/>
151       </xsl:attribute>
152     </xsl:if>
153
154     <xsl:call-template name="partintro.titlepage"/>
155     <xsl:apply-templates/>
156
157     <xsl:variable name="toc.params">
158       <xsl:call-template name="find.path.params">
159         <xsl:with-param name="node" select="parent::*"/>
160         <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
161       </xsl:call-template>
162     </xsl:variable>
163     <xsl:if test="contains($toc.params, 'toc')">
164       <!-- not ancestor::part because partintro appears in reference -->
165       <xsl:apply-templates select="parent::*" mode="make.part.toc"/>
166     </xsl:if>
167     <xsl:call-template name="process.footnotes"/>
168   </div>
169 </xsl:template>
170
171 <xsl:template match="partintro/title"></xsl:template>
172 <xsl:template match="partintro/titleabbrev"></xsl:template>
173 <xsl:template match="partintro/subtitle"></xsl:template>
174
175 <xsl:template match="partintro/title" mode="partintro.title.mode">
176   <h2>
177     <xsl:apply-templates/>
178   </h2>
179 </xsl:template>
180
181 <xsl:template match="partintro/subtitle" mode="partintro.title.mode">
182   <h3>
183     <i><xsl:apply-templates/></i>
184   </h3>
185 </xsl:template>
186
187 <!-- ==================================================================== -->
188
189 <xsl:template match="book" mode="division.number">
190   <xsl:number from="set" count="book" format="1."/>
191 </xsl:template>
192
193 <xsl:template match="part" mode="division.number">
194   <xsl:number from="book" count="part" format="I."/>
195 </xsl:template>
196
197 <!-- ==================================================================== -->
198
199 <xsl:template name="division.title">
200   <xsl:param name="node" select="."/>
201
202   <h1>
203     <xsl:attribute name="class">title</xsl:attribute>
204     <xsl:if test="$generate.id.attributes = 0">
205       <xsl:call-template name="anchor">
206         <xsl:with-param name="node" select="$node"/>
207         <xsl:with-param name="conditional" select="0"/>
208       </xsl:call-template>
209     </xsl:if>
210       <xsl:apply-templates select="$node" mode="object.title.markup">
211       <xsl:with-param name="allow-anchors" select="1"/>
212     </xsl:apply-templates>
213   </h1>
214 </xsl:template>
215
216 </xsl:stylesheet>
217