scan: put TITLE after FILE and before any symbols.
[gtk-doc.git] / gtk-doc.xsl
blob96c6c89a9ace5796db5d4b924fbb65c1320e9c25
1 <?xml version='1.0'?> <!--*- mode: xml -*-->
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 version="1.0">
5 <!-- import the chunked XSL stylesheet -->
6 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
7 <xsl:include href="devhelp.xsl"/>
8 <xsl:include href="devhelp2.xsl"/>
9 <xsl:include href="version-greater-or-equal.xsl"/>
11 <!-- change some parameters -->
12 <!-- http://docbook.sourceforge.net/release/xsl/current/doc/html/index.html -->
13 <xsl:param name="toc.section.depth">2</xsl:param>
14 <xsl:param name="generate.toc">
15 book toc
16 chapter toc
17 glossary toc
18 index toc
19 part toc
20 reference toc
21 </xsl:param>
23 <xsl:param name="chunker.output.encoding" select="'UTF-8'"/>
24 <xsl:param name="chunker.output.indent" select="'yes'"/>
25 <xsl:param name="chunker.output.doctype-public" select="'-//W3C//DTD HTML 4.01 Transitional//EN'"/>
26 <xsl:param name="chunk.fast" select="1"/>
28 <xsl:param name="default.encoding" select="'UTF-8'"/>
29 <xsl:param name="chapter.autolabel" select="0"/>
30 <xsl:param name="use.id.as.filename" select="1"/>
31 <xsl:param name="html.ext" select="'.html'"/>
32 <xsl:param name="refentry.generate.name" select="0"/>
33 <xsl:param name="refentry.generate.title" select="1"/>
35 <!-- use index filtering (if available) -->
36 <xsl:param name="index.on.role" select="1"/>
38 <!-- display variablelists as tables -->
39 <xsl:param name="variablelist.as.table" select="1"/>
41 <!-- new things to consider
42 <xsl:param name="glossterm.auto.link" select="0"></xsl:param>
43 -->
45 <!-- this gets set on the command line ... -->
46 <xsl:param name="gtkdoc.version" select="''"/>
47 <xsl:param name="gtkdoc.bookname" select="''"/>
49 <!-- ========================================================= -->
51 <!-- l10n is slow, we don't ue it, so we'd like to turn it off
52 this atleast avoid the re-evaluation -->
53 <xsl:template name="l10n.language">en</xsl:template>
55 <!-- ========================================================= -->
56 <!-- template to create the index.sgml anchor index -->
58 <xsl:template match="book|article">
59 <xsl:variable name="tooldver">
60 <xsl:call-template name="version-greater-or-equal">
61 <xsl:with-param name="ver1" select="$VERSION" />
62 <xsl:with-param name="ver2">1.36</xsl:with-param>
63 </xsl:call-template>
64 </xsl:variable>
65 <xsl:if test="$tooldver = 0">
66 <xsl:message terminate="yes">
67 FATAL-ERROR: You need the DocBook XSL Stylesheets version 1.36 or higher
68 to build the documentation.
69 Get a newer version at http://docbook.sourceforge.net/projects/xsl/
70 </xsl:message>
71 </xsl:if>
72 <xsl:apply-imports/>
74 <!-- generate the index.sgml href index -->
75 <xsl:call-template name="generate.index"/>
76 <xsl:call-template name="generate.devhelp"/>
77 <xsl:call-template name="generate.devhelp2"/>
78 </xsl:template>
80 <xsl:template name="generate.index">
81 <xsl:call-template name="write.text.chunk">
82 <xsl:with-param name="filename" select="'index.sgml'"/>
83 <xsl:with-param name="content">
84 <xsl:apply-templates select="/book/bookinforeleaseinfo/ulink"
85 mode="generate.index.mode"/>
86 <!-- check all anchor and refentry elements -->
87 <xsl:apply-templates select="//anchor|//refentry|//refsect1|//refsect2|//refsynopsisdiv|//varlistentry"
88 mode="generate.index.mode"/>
89 </xsl:with-param>
90 <xsl:with-param name="default.encoding" select="'UTF-8'"/>
91 <xsl:with-param name="chunker.output.indent" select="'no'"/>
92 </xsl:call-template>
93 </xsl:template>
95 <xsl:template match="*" mode="generate.index.mode">
96 <xsl:if test="not(@href) and count(@id) > 0">
97 <xsl:text>&lt;ANCHOR id=&quot;</xsl:text>
98 <xsl:value-of select="@id"/>
99 <xsl:text>&quot; href=&quot;</xsl:text>
100 <xsl:if test="$gtkdoc.bookname">
101 <xsl:value-of select="$gtkdoc.bookname"/>
102 <xsl:text>/</xsl:text>
103 </xsl:if>
104 <xsl:call-template name="href.target"/>
105 <xsl:text>&quot;&gt;&#10;</xsl:text>
106 </xsl:if>
107 </xsl:template>
109 <xsl:template match="/book/bookinfo/releaseinfo/ulink" mode="generate.index.mode">
110 <xsl:if test="@role='online-location'">
111 <xsl:text>&lt;ONLINE href=&quot;</xsl:text>
112 <xsl:value-of select="@url"/>
113 <xsl:text>&quot;&gt;&#10;</xsl:text>
114 </xsl:if>
115 </xsl:template>
117 <!-- ========================================================= -->
118 <!-- template to output gtkdoclink elements for the unknown targets -->
120 <xsl:template match="link">
121 <xsl:choose>
122 <xsl:when test="id(@linkend)">
123 <xsl:apply-imports/>
124 </xsl:when>
125 <xsl:otherwise>
126 <GTKDOCLINK HREF="{@linkend}">
127 <xsl:apply-templates/>
128 </GTKDOCLINK>
129 </xsl:otherwise>
130 </xsl:choose>
131 </xsl:template>
133 <!-- ========================================================= -->
134 <!-- Below are the visual portions of the stylesheet. They provide
135 the normal gtk-doc output style. -->
137 <xsl:param name="shade.verbatim" select="0"/>
138 <xsl:param name="refentry.separator" select="0"/>
140 <xsl:template match="refsect2">
141 <xsl:if test="preceding-sibling::refsect2">
142 <hr/>
143 </xsl:if>
144 <xsl:apply-imports/>
145 </xsl:template>
147 <xsl:template name="user.head.content">
148 <xsl:if test="$gtkdoc.version">
149 <meta name="generator" content="GTK-Doc V{$gtkdoc.version} (XML mode)"/>
150 </xsl:if>
151 <link rel="stylesheet" href="style.css" type="text/css"/>
153 <!-- copied from the html.head template in the docbook stylesheets
154 we don't want links for all refentrys, thats just too much
156 <xsl:variable name="this" select="."/>
157 <xsl:for-each select="//part
158 |//reference
159 |//preface
160 |//chapter
161 |//article
162 |//appendix[not(parent::article)]|appendix
163 |//glossary[not(parent::article)]|glossary
164 |//index[not(parent::article)]|index">
165 <link rel="{local-name(.)}">
166 <xsl:attribute name="href">
167 <xsl:call-template name="href.target">
168 <xsl:with-param name="context" select="$this"/>
169 <xsl:with-param name="object" select="."/>
170 </xsl:call-template>
171 </xsl:attribute>
172 <xsl:attribute name="title">
173 <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
174 </xsl:attribute>
175 </link>
176 </xsl:for-each>
177 </xsl:template>
179 <xsl:template name="user.footer.content">
180 <div class="footer">
181 <hr />
182 <xsl:choose>
183 <xsl:when test="$gtkdoc.version">
184 Generated by GTK-Doc V<xsl:copy-of select="$gtkdoc.version" />
185 </xsl:when>
186 <xsl:otherwise>
187 Generated by GTK-Doc
188 </xsl:otherwise>
189 </xsl:choose>
190 </div>
191 </xsl:template>
193 <xsl:template match="title" mode="book.titlepage.recto.mode">
194 <table class="navigation" id="top" width="100%"
195 cellpadding="2" cellspacing="0">
196 <tr>
197 <th valign="middle">
198 <p class="{name(.)}">
199 <xsl:value-of select="."/>
200 </p>
201 </th>
202 </tr>
203 </table>
204 </xsl:template>
206 <xsl:template name="header.navigation">
207 <xsl:param name="prev" select="/foo"/>
208 <xsl:param name="next" select="/foo"/>
209 <xsl:variable name="home" select="/*[1]"/>
210 <xsl:variable name="up" select="parent::*"/>
211 <xsl:variable name="refsections" select="./refsect1[@role]"/>
212 <xsl:variable name="glssections" select="./glossdiv/title"/>
213 <xsl:variable name="idxsections" select="./indexdiv/indexdiv/title"/>
214 <xsl:variable name="section_id" select="./@id"/>
215 <xsl:variable name="sect_object_hierarchy" select="./refsect1[@role='object_hierarchy']"/>
216 <xsl:variable name="sect_impl_interfaces" select="./refsect1[@role='impl_interfaces']"/>
217 <xsl:variable name="sect_prerequisites" select="./refsect1[@role='prerequisites']"/>
218 <xsl:variable name="sect_derived_interfaces" select="./refsect1[@role='derived_interfaces']"/>
219 <xsl:variable name="sect_implementations" select="./refsect1[@role='implementations']"/>
220 <xsl:variable name="sect_properties" select="./refsect1[@role='properties']"/>
221 <xsl:variable name="sect_child_properties" select="./refsect1[@role='child_properties']"/>
222 <xsl:variable name="sect_style_properties" select="./refsect1[@role='style_properties']"/>
223 <xsl:variable name="sect_signal_proto" select="./refsect1[@role='signal_proto']"/>
224 <xsl:variable name="sect_desc" select="./refsect1[@role='desc']"/>
225 <xsl:variable name="sect_synopsis" select="./refsynopsisdiv[@role='synopsis']"/>
226 <!--
227 <xsl:variable name="sect_details" select="./refsect1[@id='details']"/>
228 <xsl:variable name="sect_property_details" select="./refsect1[@id='property_details']"/>
229 <xsl:variable name="sect_child_property_details" select="./refsect1[@id='child_property_details']"/>
230 <xsl:variable name="sect_style_property_details" select="./refsect1[@id='style_property_details']"/>
231 <xsl:variable name="sect_signals" select="./refsect1[@id='signals']"/>
234 <xsl:if test="$suppress.navigation = '0' and $home != .">
235 <table class="navigation" id="top" width="100%"
236 summary = "Navigation header" cellpadding="2" cellspacing="2">
237 <tr valign="middle">
238 <xsl:choose>
239 <xsl:when test="count($prev) > 0">
240 <td>
241 <a accesskey="p">
242 <xsl:attribute name="href">
243 <xsl:call-template name="href.target">
244 <xsl:with-param name="object" select="$prev"/>
245 </xsl:call-template>
246 </xsl:attribute>
247 <img src="left.png" width="24" height="24" border="0">
248 <xsl:attribute name="alt">
249 <xsl:call-template name="gentext">
250 <xsl:with-param name="key">nav-prev</xsl:with-param>
251 </xsl:call-template>
252 </xsl:attribute>
253 </img>
254 </a>
255 </td>
256 </xsl:when>
257 <xsl:otherwise>
258 <td>&#160;</td>
259 </xsl:otherwise>
260 </xsl:choose>
261 <xsl:choose>
262 <xsl:when test="count($up) > 0 and $up != $home">
263 <td>
264 <a accesskey="u">
265 <xsl:attribute name="href">
266 <xsl:call-template name="href.target">
267 <xsl:with-param name="object" select="$up"/>
268 </xsl:call-template>
269 </xsl:attribute>
270 <img src="up.png" width="24" height="24" border="0">
271 <xsl:attribute name="alt">
272 <xsl:call-template name="gentext">
273 <xsl:with-param name="key">nav-up</xsl:with-param>
274 </xsl:call-template>
275 </xsl:attribute>
276 </img>
277 </a>
278 </td>
279 </xsl:when>
280 <xsl:otherwise>
281 <td>&#160;</td>
282 </xsl:otherwise>
283 </xsl:choose>
284 <xsl:choose>
285 <xsl:when test="$home != .">
286 <td>
287 <a accesskey="h">
288 <xsl:attribute name="href">
289 <xsl:call-template name="href.target">
290 <xsl:with-param name="object" select="$home"/>
291 </xsl:call-template>
292 </xsl:attribute>
293 <img src="home.png" width="24" height="24" border="0">
294 <xsl:attribute name="alt">
295 <xsl:call-template name="gentext">
296 <xsl:with-param name="key">nav-home</xsl:with-param>
297 </xsl:call-template>
298 </xsl:attribute>
299 </img>
300 </a>
301 </td>
302 </xsl:when>
303 <xsl:otherwise>
304 <td>&#160;</td>
305 </xsl:otherwise>
306 </xsl:choose>
307 <th width="100%" align="center">
308 <xsl:apply-templates select="$home" mode="object.title.markup"/>
309 </th>
310 <xsl:choose>
311 <xsl:when test="count($next) > 0">
312 <td>
313 <a accesskey="n">
314 <xsl:attribute name="href">
315 <xsl:call-template name="href.target">
316 <xsl:with-param name="object" select="$next"/>
317 </xsl:call-template>
318 </xsl:attribute>
319 <img src="right.png" width="24" height="24" border="0">
320 <xsl:attribute name="alt">
321 <xsl:call-template name="gentext">
322 <xsl:with-param name="key">nav-next</xsl:with-param>
323 </xsl:call-template>
324 </xsl:attribute>
325 </img>
326 </a>
327 </td>
328 </xsl:when>
329 <xsl:otherwise>
330 <td>&#160;</td>
331 </xsl:otherwise>
332 </xsl:choose>
333 </tr>
334 <!--<xsl:if test="name()='refentry'"-->
335 <xsl:choose>
336 <xsl:when test="count($refsections) > 0">
337 <tr>
338 <td colspan="5" class="shortcuts">
339 <xsl:if test="count($sect_synopsis) > 0">
340 <a href="#{$section_id}.synopsis" class="shortcut">Top</a>
341 </xsl:if>
342 <xsl:if test="count($sect_desc) > 0">
343 &#160;|&#160;
344 <a href="#{$section_id}.description" class="shortcut">
345 <xsl:value-of select="./refsect1[@role='desc']/title"/>
346 </a>
347 </xsl:if>
348 <xsl:if test="count($sect_object_hierarchy) > 0">
349 &#160;|&#160;
350 <a href="#{$section_id}.object-hierarchy" class="shortcut">
351 <xsl:value-of select="./refsect1[@role='object_hierarchy']/title"/>
352 </a>
353 </xsl:if>
354 <xsl:if test="count($sect_impl_interfaces) > 0">
355 &#160;|&#160;
356 <a href="#{$section_id}.implemented-interfaces" class="shortcut">
357 <xsl:value-of select="./refsect1[@role='impl_interfaces']/title"/>
358 </a>
359 </xsl:if>
360 <xsl:if test="count($sect_prerequisites) > 0">
361 &#160;|&#160;
362 <a href="#{$section_id}.prerequisites" class="shortcut">
363 <xsl:value-of select="./refsect1[@role='prerequisites']/title"/>
364 </a>
365 </xsl:if>
366 <xsl:if test="count($sect_derived_interfaces) > 0">
367 &#160;|&#160;
368 <a href="#{$section_id}.derived-interfaces" class="shortcut">
369 <xsl:value-of select="./refsect1[@role='derived_interfaces']/title"/>
370 </a>
371 </xsl:if>
372 <xsl:if test="count($sect_implementations) > 0">
373 &#160;|&#160;
374 <a href="#{$section_id}.implementations" class="shortcut">
375 <xsl:value-of select="./refsect1[@role='implementations']/title"/>
376 </a>
377 </xsl:if>
378 <xsl:if test="count($sect_properties) > 0">
379 &#160;|&#160;
380 <a href="#{$section_id}.properties" class="shortcut">
381 <xsl:value-of select="./refsect1[@role='properties']/title"/>
382 </a>
383 </xsl:if>
384 <xsl:if test="count($sect_child_properties) > 0">
385 &#160;|&#160;
386 <a href="#{$section_id}.child-properties" class="shortcut">
387 <xsl:value-of select="./refsect1[@role='child_properties']/title"/>
388 </a>
389 </xsl:if>
390 <xsl:if test="count($sect_style_properties) > 0">
391 &#160;|&#160;
392 <a href="#{$section_id}.style-properties" class="shortcut">
393 <xsl:value-of select="./refsect1[@role='style_properties']/title"/>
394 </a>
395 </xsl:if>
396 <xsl:if test="count($sect_signal_proto) > 0">
397 &#160;|&#160;
398 <a href="#{$section_id}.signals" class="shortcut">
399 <xsl:value-of select="./refsect1[@role='signal_proto']/title"/>
400 </a>
401 </xsl:if>
402 <!--
403 <xsl:if test="count($sect_details) > 0">
404 <a href="#details" class="shortcut">
405 <xsl:value-of select="./refsect1[@id='details']/title"/>
406 </a>
407 &#160;|&#160;
408 </xsl:if>
409 <xsl:if test="count($sect_property_details) > 0">
410 <a href="#property_details" class="shortcut">
411 <xsl:value-of select="./refsect1[@id='property_details']/title"/>
412 </a>
413 &#160;|&#160;
414 </xsl:if>
415 <xsl:if test="count($sect_child_property_details) > 0">
416 <a href="#child_property_details" class="shortcut">
417 <xsl:value-of select="./refsect1[@id='property_child_details']/title"/>
418 </a>
419 &#160;|&#160;
420 </xsl:if>
421 <xsl:if test="count($sect_style_property_details) > 0">
422 <a href="#style_property_details" class="shortcut">
423 <xsl:value-of select="./refsect1[@id='style_property_details']/title"/>
424 </a>
425 &#160;|&#160;
426 </xsl:if>
427 <xsl:if test="count($sect_signals) > 0">
428 <a href="#signals" class="shortcut">
429 <xsl:value-of select="./refsect1[@id='signals']/title"/>
430 </a>
431 &#160;|&#160;
432 </xsl:if>
434 </td>
435 </tr>
436 </xsl:when>
437 <!-- this is not yet very nice, as it requires all glossdic/indexdiv
438 elements having a anchor element. maybe we can customize the xsl
439 to automaticaly create local anchors
441 <xsl:when test="count($glssections) > 0">
442 <tr>
443 <td colspan="5" class="shortcuts">
444 <xsl:for-each select="./glossdiv">
445 <xsl:if test="position() > 1">
446 &#160;|&#160;
447 </xsl:if>
448 <a class="shortcut">
449 <xsl:attribute name="href">#gls<xsl:value-of select="./title"/></xsl:attribute>
450 <xsl:value-of select="./title"/>
451 </a>
452 </xsl:for-each>
453 </td>
454 </tr>
455 </xsl:when>
456 <xsl:when test="count($idxsections) > 0">
457 <tr>
458 <td colspan="5" class="shortcuts">
459 <xsl:for-each select="./indexdiv/indexdiv">
460 <xsl:if test="position() > 1">
461 &#160;|&#160;
462 </xsl:if>
463 <a class="shortcut">
464 <xsl:attribute name="href">#idx<xsl:value-of select="./title"/></xsl:attribute>
465 <xsl:value-of select="./title"/>
466 </a>
467 </xsl:for-each>
468 </td>
469 </tr>
470 </xsl:when>
471 </xsl:choose>
472 </table>
473 </xsl:if>
474 </xsl:template>
476 <xsl:template name="footer.navigation">
477 </xsl:template>
479 <!-- avoid creating multiple identical indices
480 if the stylesheets don't support filtered indices
482 <xsl:template match="index">
483 <xsl:variable name="has-filtered-index">
484 <xsl:call-template name="version-greater-or-equal">
485 <xsl:with-param name="ver1" select="$VERSION" />
486 <xsl:with-param name="ver2">1.66</xsl:with-param>
487 </xsl:call-template>
488 </xsl:variable>
489 <xsl:if test="($has-filtered-index = 1) or (count(@role) = 0)">
490 <xsl:apply-imports/>
491 </xsl:if>
492 </xsl:template>
494 <xsl:template match="index" mode="toc">
495 <xsl:variable name="has-filtered-index">
496 <xsl:call-template name="version-greater-or-equal">
497 <xsl:with-param name="ver1" select="$VERSION" />
498 <xsl:with-param name="ver2">1.66</xsl:with-param>
499 </xsl:call-template>
500 </xsl:variable>
501 <xsl:if test="($has-filtered-index = 1) or (count(@role) = 0)">
502 <xsl:apply-imports/>
503 </xsl:if>
504 </xsl:template>
506 <xsl:template match="para">
507 <xsl:choose>
508 <xsl:when test="@role = 'gallery'">
509 <div class="container">
510 <div class="gallery-spacer"> </div>
511 <xsl:apply-templates mode="gallery.mode"/>
512 <div class="gallery-spacer"> </div>
513 </div>
514 </xsl:when>
515 <xsl:otherwise>
516 <xsl:apply-imports/>
517 </xsl:otherwise>
518 </xsl:choose>
519 </xsl:template>
520 <!-- FIXME: try if that works too -->
521 <!--xsl:template match="para[@role='gallery']">
522 <div class="container">
523 <div class="gallery-spacer"> </div>
524 <xsl:apply-templates mode="gallery.mode"/>
525 <div class="gallery-spacer"> </div>
526 </div>
527 </xsl:template-->
531 <xsl:template match="link" mode="gallery.mode">
532 <div class="gallery-float">
533 <xsl:apply-templates select="."/>
534 </div>
535 </xsl:template>
537 <!-- add gallery handling to refnamediv template -->
538 <xsl:template match="refnamediv">
539 <div class="{name(.)}">
540 <table width="100%">
541 <tr><td valign="top">
542 <xsl:call-template name="anchor"/>
543 <xsl:choose>
544 <xsl:when test="$refentry.generate.name != 0">
545 <h2>
546 <xsl:call-template name="gentext">
547 <xsl:with-param name="key" select="'RefName'"/>
548 </xsl:call-template>
549 </h2>
550 </xsl:when>
551 <xsl:when test="$refentry.generate.title != 0">
552 <h2>
553 <xsl:choose>
554 <xsl:when test="../refmeta/refentrytitle">
555 <xsl:apply-templates select="../refmeta/refentrytitle"/>
556 </xsl:when>
557 <xsl:otherwise>
558 <xsl:apply-templates select="refname[1]"/>
559 </xsl:otherwise>
560 </xsl:choose>
561 </h2>
562 </xsl:when>
563 </xsl:choose>
565 <xsl:apply-templates/>
566 </p>
567 </td>
568 <td valign="top" align="right">
569 <!-- find the gallery image to use here
570 - determine the id of the enclosing refentry
571 - look for an inlinegraphic inside a link with linkend == refentryid inside a para with role == gallery
572 - use it here
574 <xsl:variable name="refentryid" select="../@id"/>
575 <xsl:apply-templates select="//para[@role = 'gallery']/link[@linkend = $refentryid]/inlinegraphic"/>
576 </td></tr>
577 </table>
578 </div>
579 </xsl:template>
581 <!-- add anchors for index sections -->
582 <xsl:template match="indexdiv">
583 <a><xsl:attribute name="name">idx<xsl:value-of select="./title"/></xsl:attribute></a>
584 <xsl:apply-templates/>
585 </xsl:template>
587 <!-- add anchors for glossary sections -->
588 <xsl:template match="glossdiv">
589 <a><xsl:attribute name="name">gls<xsl:value-of select="./title"/></xsl:attribute></a>
590 <xsl:apply-templates/>
591 </xsl:template>
593 <!-- Exterminate any trace of indexterms in the main flow -->
594 <xsl:template match="indexterm">
595 </xsl:template>
597 <!-- Extra link on the right side of doc-blobs -->
598 <xsl:template name="user.format.extralinks">
599 <xsl:if test="../ulink[@role='extralinks']">
600 <span class="extralinks">
601 <xsl:for-each select="../ulink[@role='extralinks']">
602 <xsl:if test="position() = 1">[&#160;</xsl:if>
603 <xsl:if test="position() > 1">&#160;|&#160;</xsl:if>
605 <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
606 <xsl:copy-of select="text()" />
607 </a>
608 <xsl:if test="position() = last()">&#160;]</xsl:if>
609 </xsl:for-each>
610 </span>
611 </xsl:if>
612 <!--xsl:copy-of select="text()" /-->
613 <xsl:apply-templates/>
614 </xsl:template>
616 <!-- this is not in use yet (see gtkdoc-mkdb
617 <xsl:template match="//refsect2/ulink[@role='extralinks']"/>
618 <xsl:template match="//refsect1/ulink[@role='extralinks']"/>
620 <xsl:template match="//refsect2/title">
621 <h3><xsl:call-template name="user.format.extralinks"/></h3>
622 </xsl:template>
624 <xsl:template match="//refsect1/title">
625 <h2><xsl:call-template name="user.format.extralinks"/></h2>
626 </xsl:template>
629 <!-- ==================================================================== -->
631 <xsl:template match="acronym">
632 <xsl:call-template name="generate.acronym.link"/>
633 </xsl:template>
635 <xsl:template name="generate.acronym.link">
636 <xsl:param name="acronym">
637 <xsl:apply-templates/>
638 </xsl:param>
639 <!--
640 We use for-each to change context to the database document because key()
641 only locates elements in the same document as the context node!
644 <xsl:param name="value" >
645 <xsl:value-of select="//glossentry/glossterm[text()=$acronym]/../glossdef/para[1]" />
646 </xsl:param>
647 <xsl:choose>
648 <xsl:when test="$value=''">
649 <!-- debug -->
650 <xsl:message>
651 In gtk-doc.xsl: For acronym (<xsl:value-of select="$acronym"/>) no value found!
652 </xsl:message>
654 <xsl:attribute name="href">
655 <xsl:text>http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=</xsl:text>
656 <xsl:value-of select="$acronym"/>
657 </xsl:attribute>
658 <xsl:call-template name="inline.charseq"/>
659 </a>
660 </xsl:when>
661 <xsl:otherwise>
662 <!-- found -->
663 <acronym>
664 <xsl:attribute name="title">
665 <xsl:value-of select="$value"/>
666 </xsl:attribute>
667 <xsl:call-template name="inline.charseq"/>
668 </acronym>
669 </xsl:otherwise>
670 </xsl:choose>
671 </xsl:template>
673 </xsl:stylesheet>