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