1 <?xml version='
1.0'
?> <!--*- mode: xml -*-->
2 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
3 xmlns:
l=
"http://docbook.sourceforge.net/xmlns/l10n/1.0"
4 exclude-result-prefixes=
"l"
7 <!-- import the chunked XSL stylesheet -->
8 <!-- http://www.sagehill.net/docbookxsl/Chunking.html#FastChunking says we should use
9 "chunkfast.xsl", but I can't see a difference. Also it is not clear wheter
10 one should still set "chunk.fast". Again, no meassuable difference. -->
11 <xsl:import href=
"http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
12 <xsl:include href=
"devhelp2.xsl"/>
13 <xsl:include href=
"version-greater-or-equal.xsl"/>
15 <xsl:key name=
"acronym.key" match=
"glossentry/glossterm" use=
"."/>
16 <xsl:key name=
"gallery.key" match=
"para[@role='gallery']/link" use=
"@linkend"/>
18 <!-- change some parameters -->
19 <!-- http://docbook.sourceforge.net/release/xsl/current/doc/html/index.html -->
20 <xsl:param name=
"admon.style"/>
21 <xsl:param name=
"toc.section.depth">2</xsl:param>
22 <xsl:param name=
"generate.toc">
30 <xsl:param name=
"process.empty.source.toc">1</xsl:param>
32 <xsl:param name=
"chunker.output.encoding" select=
"'UTF-8'"/>
33 <xsl:param name=
"chunker.output.indent" select=
"'yes'"/>
34 <xsl:param name=
"chunker.output.doctype-public" select=
"'-//W3C//DTD HTML 4.01 Transitional//EN'"/>
35 <xsl:param name=
"chunk.fast" select=
"1"/>
37 <xsl:param name=
"default.encoding" select=
"'UTF-8'"/>
38 <xsl:param name=
"chapter.autolabel" select=
"0"/>
39 <xsl:param name=
"use.id.as.filename" select=
"1"/>
40 <xsl:param name=
"generate.consistent.ids" select=
"1"/>
41 <xsl:param name=
"html.ext" select=
"'.html'"/>
42 <xsl:param name=
"refentry.generate.name" select=
"0"/>
43 <xsl:param name=
"refentry.generate.title" select=
"1"/>
44 <!-- don't generate all those link tags (very slow and hardly used)
45 it does not show much effect as we have a user.head.content template
46 <xsl:param name="html.extra.head.links" select="0" />
49 <!-- use index filtering (if available) -->
50 <xsl:param name=
"index.on.role" select=
"1"/>
52 <!-- display variablelists as tables -->
53 <xsl:param name=
"variablelist.as.table" select=
"1"/>
55 <!-- new things to consider
56 <xsl:param name="glossterm.auto.link" select="0"></xsl:param>
59 <!-- this gets set on the command line ... -->
60 <xsl:param name=
"gtkdoc.version" select=
"''"/>
61 <xsl:param name=
"gtkdoc.bookname" select=
"''"/>
63 <!-- Override the typical template to prevent showing titles -->
64 <xsl:param name=
"admon.textlabel" select=
"0"/>
66 <!-- ========================================================= -->
68 <!-- l10n is slow, we don't ue it, so we'd like to turn it off
69 this atleast avoid the re-evaluation -->
70 <xsl:template name=
"l10n.language">en
</xsl:template>
72 <xsl:param name=
"gtkdoc.l10n.xml" select=
"document('http://docbook.sourceforge.net/release/xsl/current/common/en.xml')"/>
74 <xsl:key name=
"gtkdoc.gentext.key" match=
"l:gentext[@key]" use=
"@key"/>
75 <xsl:key name=
"gtkdoc.context.key" match=
"l:context[@name]" use=
"@name"/>
77 <xsl:template name=
"gentext">
78 <xsl:param name=
"key" select=
"local-name(.)"/>
80 <xsl:for-each select=
"$gtkdoc.l10n.xml">
81 <xsl:variable name=
"l10n.gentext" select=
"key('gtkdoc.gentext.key', $key)"/>
84 <xsl:when test=
"$l10n.gentext">
85 <xsl:value-of select=
"$l10n.gentext/@text"/>
89 <xsl:text>No
"en" localization of
"</xsl:text>
90 <xsl:value-of select="$key
"/>
91 <xsl:text>" exists.
</xsl:text>
98 <xsl:template name=
"gentext.dingbat">
99 <xsl:param name=
"dingbat">bullet
</xsl:param>
101 <xsl:variable name=
"l10n.dingbat"
102 select=
"($gtkdoc.l10n.xml/l:l10n/l:dingbat[@key=$dingbat])[1]"/>
105 <xsl:when test=
"$l10n.dingbat">
106 <xsl:value-of select=
"$l10n.dingbat/@text"/>
110 <xsl:text>No
"en" localization of dingbat
</xsl:text>
111 <xsl:value-of select=
"$dingbat"/>
112 <xsl:text> exists; using
"en".
</xsl:text>
118 <xsl:template name=
"gentext.template">
119 <xsl:param name=
"context" select=
"'default'"/>
120 <xsl:param name=
"name" select=
"'default'"/>
121 <xsl:param name=
"origname" select=
"$name"/>
123 <!-- cut leading / if any to avoid one recursion -->
124 <xsl:variable name=
"rname">
126 <xsl:when test=
"starts-with($name, '/')">
127 <xsl:value-of select=
"substring-after($name, '/')"/>
130 <xsl:value-of select=
"$name"/>
135 <!-- this is called with context="title|title-numbered|title-unnumbered>
137 <xsl:text>context:</xsl:text><xsl:value-of select="$context"/>
138 <xsl:text>;name:</xsl:text><xsl:value-of select="$rname"/>
139 <xsl:text>;origname:</xsl:text><xsl:value-of select="$origname"/>
142 see html/html.xsl:<xsl:template match="*" mode="html.title.attribute">
145 <xsl:for-each select=
"$gtkdoc.l10n.xml">
146 <xsl:variable name=
"context.node" select=
"key('gtkdoc.context.key', $context)"/>
147 <xsl:variable name=
"template.node"
148 select=
"($context.node/l:template[@name=$rname])[1]"/>
151 <xsl:when test=
"$template.node/@text">
152 <xsl:value-of select=
"$template.node/@text"/>
155 <xsl:text>=</xsl:text><xsl:value-of select="$template.node/@text"/>
161 <xsl:when test=
"contains($rname, '/')">
162 <xsl:call-template name=
"gentext.template">
163 <xsl:with-param name=
"context" select=
"$context"/>
164 <xsl:with-param name=
"name" select=
"substring-after($rname, '/')"/>
165 <xsl:with-param name=
"origname" select=
"$origname"/>
174 <!-- silently test whether a gentext template exists -->
175 <xsl:template name=
"gentext.template.exists">
176 <xsl:param name=
"context" select=
"'default'"/>
177 <xsl:param name=
"name" select=
"'default'"/>
178 <xsl:param name=
"origname" select=
"$name"/>
180 <xsl:variable name=
"template">
181 <xsl:call-template name=
"gentext.template">
182 <xsl:with-param name=
"context" select=
"$context"/>
183 <xsl:with-param name=
"name" select=
"$name"/>
184 <xsl:with-param name=
"origname" select=
"$origname"/>
189 <xsl:when test=
"string-length($template) != 0">1</xsl:when>
190 <xsl:otherwise>0</xsl:otherwise>
194 <!-- shortcut version -->
195 <!-- @bug: https://bugzilla.gnome.org/show_bug.cgi?id=617478 -->
196 <xsl:template name=
"generate.html.title"/>
197 <!--xsl:template name="generate.html.title">
198 <xsl:variable name="has.title.markup">
199 <xsl:apply-templates select="." mode="title.markup">
200 <xsl:with-param name="verbose" select="0"/>
201 </xsl:apply-templates>
203 <xsl:if test="$has.title.markup != '???TITLE???'">
204 <xsl:variable name="gentext.title">
205 <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
208 <xsl:when test="string-length($gentext.title) != 0">
209 <xsl:attribute name="title">
210 <xsl:value-of select="$gentext.title"/>
213 <xsl:when test="alt">
214 <xsl:attribute name="title">
215 <xsl:value-of select="normalize-space(alt)"/>
222 <!-- Generate a title attribute for the context node (e.g. links) -->
223 <xsl:template match=
"*" mode=
"html.title.attribute">
224 <xsl:variable name=
"has.title.markup">
225 <xsl:apply-templates select=
"." mode=
"title.markup">
226 <xsl:with-param name=
"verbose" select=
"0"/>
227 </xsl:apply-templates>
229 <xsl:if test=
"$has.title.markup != '???TITLE???'">
230 <xsl:variable name=
"is.title">
231 <xsl:call-template name=
"gentext.template.exists">
232 <xsl:with-param name=
"context" select=
"'title'"/>
233 <xsl:with-param name=
"name" select=
"local-name(.)"/>
234 <xsl:with-param name=
"lang">
235 <xsl:call-template name=
"l10n.language"/>
240 <xsl:variable name=
"is.title-numbered">
241 <xsl:if test=
"$is.title = 0">
242 <xsl:call-template name=
"gentext.template.exists">
243 <xsl:with-param name=
"context" select=
"'title-numbered'"/>
244 <xsl:with-param name=
"name" select=
"local-name(.)"/>
245 <xsl:with-param name=
"lang">
246 <xsl:call-template name=
"l10n.language"/>
252 <xsl:variable name=
"is.title-unnumbered">
253 <xsl:if test=
"$is.title = 0 and $is.title-numbered = 0">
254 <xsl:call-template name=
"gentext.template.exists">
255 <xsl:with-param name=
"context" select=
"'title-unnumbered'"/>
256 <xsl:with-param name=
"name" select=
"local-name(.)"/>
257 <xsl:with-param name=
"lang">
258 <xsl:call-template name=
"l10n.language"/>
264 <xsl:variable name=
"gentext.title">
265 <xsl:if test=
"$is.title != 0 or
266 $is.title-numbered != 0 or
267 $is.title-unnumbered != 0">
268 <xsl:apply-templates select=
"."
269 mode=
"object.title.markup.textonly"/>
274 <xsl:when test=
"string-length($gentext.title) != 0">
275 <xsl:attribute name=
"title">
276 <xsl:value-of select=
"$gentext.title"/>
279 <xsl:when test=
"alt">
280 <xsl:attribute name=
"title">
281 <xsl:value-of select=
"normalize-space(alt)"/>
291 <!-- ========================================================= -->
292 <!-- template to create the index.sgml anchor index -->
294 <xsl:template match=
"book|article">
295 <xsl:variable name=
"tooldver">
296 <xsl:call-template name=
"version-greater-or-equal">
297 <xsl:with-param name=
"ver1" select=
"$VERSION" />
298 <xsl:with-param name=
"ver2">1.36</xsl:with-param>
301 <xsl:if test=
"$tooldver = 0">
302 <xsl:message terminate=
"yes">
303 FATAL-ERROR: You need the DocBook XSL Stylesheets version
1.36 or higher
304 to build the documentation.
305 Get a newer version at http://docbook.sourceforge.net/projects/xsl/
310 <!-- generate $book.devhelp2 -->
311 <xsl:call-template name=
"generate.devhelp2"/>
314 <!-- ========================================================= -->
315 <!-- template to output gtkdoclink elements for the unknown targets -->
317 <xsl:template match=
"link">
319 <xsl:when test=
"id(@linkend)">
323 <GTKDOCLINK HREF=
"{@linkend}">
324 <xsl:apply-templates/>
330 <!-- ========================================================= -->
331 <!-- Below are the visual portions of the stylesheet. They provide
332 the normal gtk-doc output style. -->
334 <xsl:param name=
"shade.verbatim" select=
"0"/>
335 <xsl:param name=
"refentry.separator" select=
"0"/>
337 <xsl:template match=
"refsect2">
338 <xsl:if test=
"preceding-sibling::refsect2">
344 <xsl:template name=
"user.head.title">
345 <xsl:param name=
"node" select=
"."/>
346 <xsl:param name=
"title"/>
347 <xsl:variable name=
"home" select=
"/*[1]"/>
349 <xsl:copy-of select=
"$title"/>:
<xsl:apply-templates select=
"$home" mode=
"object.title.markup"/>
353 <xsl:template name=
"user.head.content">
354 <xsl:if test=
"$gtkdoc.version">
355 <meta name=
"generator" content=
"GTK-Doc V{$gtkdoc.version} (XML mode)"/>
357 <link rel=
"stylesheet" href=
"style.css" type=
"text/css"/>
360 <xsl:template name=
"user.footer.content">
364 <xsl:when test=
"$gtkdoc.version">
365 <xsl:text>Generated by GTK-Doc V
</xsl:text><xsl:copy-of select=
"$gtkdoc.version" />
368 <xsl:text>Generated by GTK-Doc
</xsl:text>
374 <xsl:template match=
"title" mode=
"book.titlepage.recto.mode">
375 <table class=
"navigation" id=
"top" width=
"100%"
376 cellpadding=
"2" cellspacing=
"0">
379 <p class=
"{name(.)}">
380 <xsl:value-of select=
"."/>
387 <xsl:template name=
"header.navigation">
388 <xsl:param name=
"prev" select=
"/foo"/>
389 <xsl:param name=
"next" select=
"/foo"/>
390 <xsl:variable name=
"home" select=
"/*[1]"/>
391 <xsl:variable name=
"up" select=
"parent::*"/>
392 <xsl:variable name=
"refsections" select=
"./refsect1[@role]"/>
393 <xsl:variable name=
"glssections" select=
"./glossdiv/title"/>
394 <xsl:variable name=
"idxsections" select=
"./indexdiv/indexdiv/title"/>
395 <xsl:variable name=
"section_id" select=
"./@id"/>
396 <xsl:variable name=
"sect_object_hierarchy" select=
"./refsect1[@role='object_hierarchy']"/>
397 <xsl:variable name=
"sect_impl_interfaces" select=
"./refsect1[@role='impl_interfaces']"/>
398 <xsl:variable name=
"sect_prerequisites" select=
"./refsect1[@role='prerequisites']"/>
399 <xsl:variable name=
"sect_derived_interfaces" select=
"./refsect1[@role='derived_interfaces']"/>
400 <xsl:variable name=
"sect_implementations" select=
"./refsect1[@role='implementations']"/>
401 <xsl:variable name=
"sect_properties" select=
"./refsect1[@role='properties']"/>
402 <xsl:variable name=
"sect_child_properties" select=
"./refsect1[@role='child_properties']"/>
403 <xsl:variable name=
"sect_style_properties" select=
"./refsect1[@role='style_properties']"/>
404 <xsl:variable name=
"sect_signal_proto" select=
"./refsect1[@role='signal_proto']"/>
405 <xsl:variable name=
"sect_desc" select=
"./refsect1[@role='desc']"/>
406 <xsl:variable name=
"sect_synopsis" select=
"./refsynopsisdiv[@role='synopsis']"/>
408 <xsl:variable name="sect_details" select="./refsect1[@id='details']"/>
409 <xsl:variable name="sect_property_details" select="./refsect1[@id='property_details']"/>
410 <xsl:variable name="sect_child_property_details" select="./refsect1[@id='child_property_details']"/>
411 <xsl:variable name="sect_style_property_details" select="./refsect1[@id='style_property_details']"/>
412 <xsl:variable name="sect_signals" select="./refsect1[@id='signals']"/>
415 <xsl:if test=
"$suppress.navigation = '0' and $home != .">
416 <table class=
"navigation" id=
"top" width=
"100%"
417 summary =
"Navigation header" cellpadding=
"2" cellspacing=
"5">
419 <td width=
"100%" align=
"left" class=
"shortcuts">
420 <!--<xsl:if test="name()='refentry'"-->
422 <xsl:when test=
"count($refsections) > 0">
423 <a href=
"#" class=
"shortcut">Top
</a>
424 <xsl:if test=
"count($sect_desc) > 0">
425 <span id=
"nav_description">  <span class=
"dim">|
</span> 
426 <a href=
"#{$section_id}.description" class=
"shortcut">
427 <xsl:value-of select=
"./refsect1[@role='desc']/title"/>
430 <xsl:if test=
"count($sect_object_hierarchy) > 0">
431 <span id=
"nav_hierarchy">  <span class=
"dim">|
</span> 
432 <a href=
"#{$section_id}.object-hierarchy" class=
"shortcut">
433 <xsl:value-of select=
"./refsect1[@role='object_hierarchy']/title"/>
436 <xsl:if test=
"count($sect_impl_interfaces) > 0">
437 <span id=
"nav_interfaces">  <span class=
"dim">|
</span> 
438 <a href=
"#{$section_id}.implemented-interfaces" class=
"shortcut">
439 <xsl:value-of select=
"./refsect1[@role='impl_interfaces']/title"/>
442 <xsl:if test=
"count($sect_prerequisites) > 0">
443 <span id=
"nav_prerequisites">  <span class=
"dim">|
</span> 
444 <a href=
"#{$section_id}.prerequisites" class=
"shortcut">
445 <xsl:value-of select=
"./refsect1[@role='prerequisites']/title"/>
448 <xsl:if test=
"count($sect_derived_interfaces) > 0">
449 <span id=
"nav_derived_interfaces">  <span class=
"dim">|
</span> 
450 <a href=
"#{$section_id}.derived-interfaces" class=
"shortcut">
451 <xsl:value-of select=
"./refsect1[@role='derived_interfaces']/title"/>
454 <xsl:if test=
"count($sect_implementations) > 0">
455 <span id=
"nav_implementations">  <span class=
"dim">|
</span> 
456 <a href=
"#{$section_id}.implementations" class=
"shortcut">
457 <xsl:value-of select=
"./refsect1[@role='implementations']/title"/>
460 <xsl:if test=
"count($sect_properties) > 0">
461 <span id=
"nav_properties">  <span class=
"dim">|
</span> 
462 <a href=
"#{$section_id}.properties" class=
"shortcut">
463 <xsl:value-of select=
"./refsect1[@role='properties']/title"/>
466 <xsl:if test=
"count($sect_child_properties) > 0">
467 <span id=
"nav_child_properties">  <span class=
"dim">|
</span> 
468 <a href=
"#{$section_id}.child-properties" class=
"shortcut">
469 <xsl:value-of select=
"./refsect1[@role='child_properties']/title"/>
472 <xsl:if test=
"count($sect_style_properties) > 0">
473 <span id=
"nav_style_properties">  <span class=
"dim">|
</span> 
474 <a href=
"#{$section_id}.style-properties" class=
"shortcut">
475 <xsl:value-of select=
"./refsect1[@role='style_properties']/title"/>
478 <xsl:if test=
"count($sect_signal_proto) > 0">
479 <span id=
"nav_signals">  <span class=
"dim">|
</span> 
480 <a href=
"#{$section_id}.signals" class=
"shortcut">
481 <xsl:value-of select=
"./refsect1[@role='signal_proto']/title"/>
485 <!-- this is not yet very nice, as it requires all glossdic/indexdiv
486 elements having a anchor element. maybe we can customize the xsl
487 to automaticaly create local anchors
489 <xsl:when test=
"count($glssections) > 0">
490 <span id=
"nav_glossary">
491 <xsl:for-each select=
"./glossdiv">
492 <xsl:if test=
"position() > 1">
493  <span class=
"dim">|
</span> 
496 <xsl:attribute name=
"href">#gls
<xsl:value-of select=
"./title"/></xsl:attribute>
497 <xsl:value-of select=
"./title"/>
502 <xsl:when test=
"count($idxsections) > 0">
503 <span id=
"nav_index">
504 <xsl:for-each select=
"./indexdiv/indexdiv">
505 <xsl:if test=
"position() > 1">
506  <span class=
"dim">|
</span> 
509 <xsl:attribute name=
"href">#idx
<xsl:value-of select=
"./title"/></xsl:attribute>
510 <xsl:value-of select=
"./title"/>
518 <xsl:when test=
"$home != .">
521 <xsl:attribute name=
"href">
522 <xsl:call-template name=
"href.target">
523 <xsl:with-param name=
"object" select=
"$home"/>
526 <img src=
"home.png" width=
"16" height=
"16" border=
"0">
527 <xsl:attribute name=
"alt">
528 <xsl:call-template name=
"gentext">
529 <xsl:with-param name=
"key">nav-home
</xsl:with-param>
541 <xsl:when test=
"count($up) > 0 and $up != $home">
544 <xsl:attribute name=
"href">
545 <xsl:call-template name=
"href.target">
546 <xsl:with-param name=
"object" select=
"$up"/>
549 <img src=
"up.png" width=
"16" height=
"16" border=
"0">
550 <xsl:attribute name=
"alt">
551 <xsl:call-template name=
"gentext">
552 <xsl:with-param name=
"key">nav-up
</xsl:with-param>
560 <td><img src=
"up-insensitive.png" width=
"16" height=
"16" border=
"0"/></td>
564 <xsl:when test=
"count($prev) > 0">
567 <xsl:attribute name=
"href">
568 <xsl:call-template name=
"href.target">
569 <xsl:with-param name=
"object" select=
"$prev"/>
572 <img src=
"left.png" width=
"16" height=
"16" border=
"0">
573 <xsl:attribute name=
"alt">
574 <xsl:call-template name=
"gentext">
575 <xsl:with-param name=
"key">nav-prev
</xsl:with-param>
583 <td><img src=
"left-insensitive.png" width=
"16" height=
"16" border=
"0"/></td>
587 <xsl:when test=
"count($next) > 0">
590 <xsl:attribute name=
"href">
591 <xsl:call-template name=
"href.target">
592 <xsl:with-param name=
"object" select=
"$next"/>
595 <img src=
"right.png" width=
"16" height=
"16" border=
"0">
596 <xsl:attribute name=
"alt">
597 <xsl:call-template name=
"gentext">
598 <xsl:with-param name=
"key">nav-next
</xsl:with-param>
606 <td><img src=
"right-insensitive.png" width=
"16" height=
"16" border=
"0"/></td>
614 <xsl:template name=
"footer.navigation">
617 <!-- avoid creating multiple identical indices
618 if the stylesheets don't support filtered indices
620 <xsl:template match=
"index">
621 <xsl:variable name=
"has-filtered-index">
622 <xsl:call-template name=
"version-greater-or-equal">
623 <xsl:with-param name=
"ver1" select=
"$VERSION" />
624 <xsl:with-param name=
"ver2">1.66</xsl:with-param>
627 <xsl:if test=
"($has-filtered-index = 1) or (count(@role) = 0)">
632 <xsl:template match=
"index" mode=
"toc">
633 <xsl:variable name=
"has-filtered-index">
634 <xsl:call-template name=
"version-greater-or-equal">
635 <xsl:with-param name=
"ver1" select=
"$VERSION" />
636 <xsl:with-param name=
"ver2">1.66</xsl:with-param>
639 <xsl:if test=
"($has-filtered-index = 1) or (count(@role) = 0)">
644 <xsl:template match=
"para">
646 <xsl:when test=
"@role = 'gallery'">
647 <div class=
"container">
648 <div class=
"gallery-spacer"> </div>
649 <xsl:apply-templates mode=
"gallery.mode"/>
650 <div class=
"gallery-spacer"> </div>
658 <!-- FIXME: try if that works too -->
659 <!--xsl:template match="para[@role='gallery']">
660 <div class="container">
661 <div class="gallery-spacer"> </div>
662 <xsl:apply-templates mode="gallery.mode"/>
663 <div class="gallery-spacer"> </div>
669 <xsl:template match="link" mode="gallery.mode">
670 <div class="gallery-float">
671 <xsl:apply-templates select="."/>
675 <!-- add gallery handling to refnamediv template -->
676 <xsl:template match=
"refnamediv">
677 <div class=
"{name(.)}">
679 <tr><td valign=
"top">
680 <xsl:call-template name=
"anchor"/>
682 <xsl:when test=
"$refentry.generate.name != 0">
684 <xsl:call-template name=
"gentext">
685 <xsl:with-param name=
"key" select=
"'RefName'"/>
689 <xsl:when test=
"$refentry.generate.title != 0">
692 <xsl:when test=
"../refmeta/refentrytitle">
693 <xsl:apply-templates select=
"../refmeta/refentrytitle"/>
696 <xsl:apply-templates select=
"refname[1]"/>
703 <xsl:apply-templates/>
706 <td class=
"gallery_image" valign=
"top" align=
"right">
708 <xsl:when test=
"../refmeta/refmiscinfo/inlinegraphic">
709 <xsl:apply-templates select=
"../refmeta/refmiscinfo/inlinegraphic"/>
712 <!-- find the gallery image to use here
713 - determine the id of the enclosing refentry
714 - look for an inlinegraphic inside a link with linkend == refentryid inside a para with role == gallery
717 <xsl:variable name=
"refentryid" select=
"../@id"/>
718 <xsl:apply-templates select=
"key('gallery.key', $refentryid)/inlinegraphic"/>
726 <!-- a copy from refentry.xsl to add the missing mode attribute,
727 see bug/729911, https://sourceforge.net/p/docbook/bugs/1358/
728 fixed in: https://sourceforge.net/p/docbook/code/9962/
730 <xsl:template match=
"refpurpose" mode=
"no.anchor.mode">
731 <xsl:if test=
"node()">
732 <xsl:text> </xsl:text>
733 <xsl:call-template name=
"dingbat">
734 <xsl:with-param name=
"dingbat">em-dash
</xsl:with-param>
736 <xsl:text> </xsl:text>
737 <xsl:apply-templates mode=
"no.anchor.mode"/>
741 <!-- add anchors for index sections -->
742 <xsl:template match=
"indexdiv">
743 <a><xsl:attribute name=
"name">idx
<xsl:value-of select=
"./title"/></xsl:attribute></a>
744 <xsl:apply-templates/>
747 <!-- add anchors for glossary sections -->
748 <xsl:template match=
"glossdiv">
749 <a><xsl:attribute name=
"name">gls
<xsl:value-of select=
"./title"/></xsl:attribute></a>
750 <xsl:apply-templates/>
753 <!-- Exterminate any trace of indexterms in the main flow -->
754 <xsl:template match=
"indexterm">
757 <!-- Extra link on the right side of doc-blobs -->
758 <xsl:template name=
"user.format.extralinks">
759 <xsl:if test=
"../ulink[@role='extralinks']">
760 <span class=
"extralinks">
761 <xsl:for-each select=
"../ulink[@role='extralinks']">
762 <xsl:if test=
"position() = 1">[
 </xsl:if>
763 <xsl:if test=
"position() > 1">  <span class=
"dim">|
</span> </xsl:if>
765 <xsl:attribute name=
"href"><xsl:value-of select=
"@url"/></xsl:attribute>
766 <xsl:copy-of select=
"text()" />
768 <xsl:if test=
"position() = last()">  ]
</xsl:if>
772 <!--xsl:copy-of select="text()" /-->
773 <xsl:apply-templates/>
776 <!-- this is not in use yet (see gtkdoc-mkdb
777 <xsl:template match="//refsect2/ulink[@role='extralinks']"/>
778 <xsl:template match="//refsect1/ulink[@role='extralinks']"/>
780 <xsl:template match="//refsect2/title">
781 <h3><xsl:call-template name="user.format.extralinks"/></h3>
784 <xsl:template match="//refsect1/title">
785 <h2><xsl:call-template name="user.format.extralinks"/></h2>
789 <!-- ==================================================================== -->
791 <xsl:template match=
"acronym">
792 <xsl:call-template name=
"generate.acronym.link"/>
795 <xsl:template name=
"generate.acronym.link">
796 <xsl:param name=
"acronym">
797 <xsl:apply-templates/>
799 <xsl:param name=
"value" >
800 <xsl:value-of select=
"key('acronym.key', $acronym)/../glossdef/para[1]" />
803 <xsl:when test=
"$value=''">
806 In gtk-doc.xsl: For acronym (
<xsl:value-of select=
"$acronym"/>) no value found!
809 <xsl:attribute name=
"href">
810 <xsl:text>http://foldoc.org/
</xsl:text>
811 <xsl:value-of select=
"$acronym"/>
813 <xsl:call-template name=
"inline.charseq"/>
819 <xsl:attribute name=
"title">
820 <xsl:value-of select=
"$value"/>
822 <xsl:call-template name=
"inline.charseq"/>