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 says we should use
9 "chunkfast.xsl", but I can see a difference -->
10 <xsl:import href=
"http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
11 <xsl:include href=
"devhelp2.xsl"/>
12 <xsl:include href=
"version-greater-or-equal.xsl"/>
14 <xsl:key name=
"acronym.key" match=
"glossentry/glossterm" use=
"."/>
15 <xsl:key name=
"gallery.key" match=
"para[@role='gallery']/link" use=
"@linkend"/>
17 <!-- change some parameters -->
18 <!-- http://docbook.sourceforge.net/release/xsl/current/doc/html/index.html -->
19 <xsl:param name=
"admon.style"/>
20 <xsl:param name=
"toc.section.depth">2</xsl:param>
21 <xsl:param name=
"generate.toc">
29 <xsl:param name=
"process.empty.source.toc">1</xsl:param>
31 <xsl:param name=
"chunker.output.encoding" select=
"'UTF-8'"/>
32 <xsl:param name=
"chunker.output.indent" select=
"'yes'"/>
33 <xsl:param name=
"chunker.output.doctype-public" select=
"'-//W3C//DTD HTML 4.01 Transitional//EN'"/>
34 <xsl:param name=
"chunk.fast" select=
"1"/>
36 <xsl:param name=
"default.encoding" select=
"'UTF-8'"/>
37 <xsl:param name=
"chapter.autolabel" select=
"0"/>
38 <xsl:param name=
"use.id.as.filename" select=
"1"/>
39 <xsl:param name=
"generate.consistent.ids" select=
"1"/>
40 <xsl:param name=
"html.ext" select=
"'.html'"/>
41 <xsl:param name=
"refentry.generate.name" select=
"0"/>
42 <xsl:param name=
"refentry.generate.title" select=
"1"/>
43 <!-- don't generate all those link tags (very slow and hardly used)
44 it does not show much effect as we have a user.head.content template
45 <xsl:param name="html.extra.head.links" select="0" />
48 <!-- use index filtering (if available) -->
49 <xsl:param name=
"index.on.role" select=
"1"/>
51 <!-- display variablelists as tables -->
52 <xsl:param name=
"variablelist.as.table" select=
"1"/>
54 <!-- new things to consider
55 <xsl:param name="glossterm.auto.link" select="0"></xsl:param>
58 <!-- this gets set on the command line ... -->
59 <xsl:param name=
"gtkdoc.version" select=
"''"/>
60 <xsl:param name=
"gtkdoc.bookname" select=
"''"/>
62 <!-- Override the typical template to prevent showing titles -->
63 <xsl:param name=
"admon.textlabel" select=
"0"/>
65 <!-- ========================================================= -->
67 <!-- l10n is slow, we don't ue it, so we'd like to turn it off
68 this atleast avoid the re-evaluation -->
69 <xsl:template name=
"l10n.language">en
</xsl:template>
71 <xsl:param name=
"gtkdoc.l10n.xml" select=
"document('http://docbook.sourceforge.net/release/xsl/current/common/en.xml')"/>
73 <xsl:key name=
"gtkdoc.gentext.key" match=
"l:gentext[@key]" use=
"@key"/>
74 <xsl:key name=
"gtkdoc.context.key" match=
"l:context[@name]" use=
"@name"/>
76 <xsl:template name=
"gentext">
77 <xsl:param name=
"key" select=
"local-name(.)"/>
79 <xsl:for-each select=
"$gtkdoc.l10n.xml">
80 <xsl:variable name=
"l10n.gentext" select=
"key('gtkdoc.gentext.key', $key)"/>
83 <xsl:when test=
"$l10n.gentext">
84 <xsl:value-of select=
"$l10n.gentext/@text"/>
88 <xsl:text>No
"en" localization of
"</xsl:text>
89 <xsl:value-of select="$key
"/>
90 <xsl:text>" exists.
</xsl:text>
97 <xsl:template name=
"gentext.dingbat">
98 <xsl:param name=
"dingbat">bullet
</xsl:param>
100 <xsl:variable name=
"l10n.dingbat"
101 select=
"($gtkdoc.l10n.xml/l:l10n/l:dingbat[@key=$dingbat])[1]"/>
104 <xsl:when test=
"$l10n.dingbat">
105 <xsl:value-of select=
"$l10n.dingbat/@text"/>
109 <xsl:text>No
"en" localization of dingbat
</xsl:text>
110 <xsl:value-of select=
"$dingbat"/>
111 <xsl:text> exists; using
"en".
</xsl:text>
117 <xsl:template name=
"gentext.template">
118 <xsl:param name=
"context" select=
"'default'"/>
119 <xsl:param name=
"name" select=
"'default'"/>
120 <xsl:param name=
"origname" select=
"$name"/>
122 <!-- cut leading / if any to avoid one recursion -->
123 <xsl:variable name=
"rname">
125 <xsl:when test=
"starts-with($name, '/')">
126 <xsl:value-of select=
"substring-after($name, '/')"/>
129 <xsl:value-of select=
"$name"/>
134 <!-- this is called with context="title|title-numbered|title-unnumbered>
136 <xsl:text>context:</xsl:text><xsl:value-of select="$context"/>
137 <xsl:text>;name:</xsl:text><xsl:value-of select="$rname"/>
138 <xsl:text>;origname:</xsl:text><xsl:value-of select="$origname"/>
141 see html/html.xsl:<xsl:template match="*" mode="html.title.attribute">
144 <xsl:for-each select=
"$gtkdoc.l10n.xml">
145 <xsl:variable name=
"context.node" select=
"key('gtkdoc.context.key', $context)"/>
146 <xsl:variable name=
"template.node"
147 select=
"($context.node/l:template[@name=$rname])[1]"/>
150 <xsl:when test=
"$template.node/@text">
151 <xsl:value-of select=
"$template.node/@text"/>
154 <xsl:text>=</xsl:text><xsl:value-of select="$template.node/@text"/>
160 <xsl:when test=
"contains($rname, '/')">
161 <xsl:call-template name=
"gentext.template">
162 <xsl:with-param name=
"context" select=
"$context"/>
163 <xsl:with-param name=
"name" select=
"substring-after($rname, '/')"/>
164 <xsl:with-param name=
"origname" select=
"$origname"/>
173 <!-- silently test whether a gentext template exists -->
174 <xsl:template name=
"gentext.template.exists">
175 <xsl:param name=
"context" select=
"'default'"/>
176 <xsl:param name=
"name" select=
"'default'"/>
177 <xsl:param name=
"origname" select=
"$name"/>
179 <xsl:variable name=
"template">
180 <xsl:call-template name=
"gentext.template">
181 <xsl:with-param name=
"context" select=
"$context"/>
182 <xsl:with-param name=
"name" select=
"$name"/>
183 <xsl:with-param name=
"origname" select=
"$origname"/>
188 <xsl:when test=
"string-length($template) != 0">1</xsl:when>
189 <xsl:otherwise>0</xsl:otherwise>
193 <!-- shortcut version -->
194 <!-- @bug: https://bugzilla.gnome.org/show_bug.cgi?id=617478 -->
195 <xsl:template name=
"generate.html.title"/>
196 <!--xsl:template name="generate.html.title">
197 <xsl:variable name="has.title.markup">
198 <xsl:apply-templates select="." mode="title.markup">
199 <xsl:with-param name="verbose" select="0"/>
200 </xsl:apply-templates>
202 <xsl:if test="$has.title.markup != '???TITLE???'">
203 <xsl:variable name="gentext.title">
204 <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
207 <xsl:when test="string-length($gentext.title) != 0">
208 <xsl:attribute name="title">
209 <xsl:value-of select="$gentext.title"/>
212 <xsl:when test="alt">
213 <xsl:attribute name="title">
214 <xsl:value-of select="normalize-space(alt)"/>
221 <!-- Generate a title attribute for the context node (e.g. links) -->
222 <xsl:template match=
"*" mode=
"html.title.attribute">
223 <xsl:variable name=
"has.title.markup">
224 <xsl:apply-templates select=
"." mode=
"title.markup">
225 <xsl:with-param name=
"verbose" select=
"0"/>
226 </xsl:apply-templates>
228 <xsl:if test=
"$has.title.markup != '???TITLE???'">
229 <xsl:variable name=
"is.title">
230 <xsl:call-template name=
"gentext.template.exists">
231 <xsl:with-param name=
"context" select=
"'title'"/>
232 <xsl:with-param name=
"name" select=
"local-name(.)"/>
233 <xsl:with-param name=
"lang">
234 <xsl:call-template name=
"l10n.language"/>
239 <xsl:variable name=
"is.title-numbered">
240 <xsl:if test=
"$is.title = 0">
241 <xsl:call-template name=
"gentext.template.exists">
242 <xsl:with-param name=
"context" select=
"'title-numbered'"/>
243 <xsl:with-param name=
"name" select=
"local-name(.)"/>
244 <xsl:with-param name=
"lang">
245 <xsl:call-template name=
"l10n.language"/>
251 <xsl:variable name=
"is.title-unnumbered">
252 <xsl:if test=
"$is.title = 0 and $is.title-numbered = 0">
253 <xsl:call-template name=
"gentext.template.exists">
254 <xsl:with-param name=
"context" select=
"'title-unnumbered'"/>
255 <xsl:with-param name=
"name" select=
"local-name(.)"/>
256 <xsl:with-param name=
"lang">
257 <xsl:call-template name=
"l10n.language"/>
263 <xsl:variable name=
"gentext.title">
264 <xsl:if test=
"$is.title != 0 or
265 $is.title-numbered != 0 or
266 $is.title-unnumbered != 0">
267 <xsl:apply-templates select=
"."
268 mode=
"object.title.markup.textonly"/>
273 <xsl:when test=
"string-length($gentext.title) != 0">
274 <xsl:attribute name=
"title">
275 <xsl:value-of select=
"$gentext.title"/>
278 <xsl:when test=
"alt">
279 <xsl:attribute name=
"title">
280 <xsl:value-of select=
"normalize-space(alt)"/>
290 <!-- ========================================================= -->
291 <!-- template to create the index.sgml anchor index -->
293 <xsl:template match=
"book|article">
294 <xsl:variable name=
"tooldver">
295 <xsl:call-template name=
"version-greater-or-equal">
296 <xsl:with-param name=
"ver1" select=
"$VERSION" />
297 <xsl:with-param name=
"ver2">1.36</xsl:with-param>
300 <xsl:if test=
"$tooldver = 0">
301 <xsl:message terminate=
"yes">
302 FATAL-ERROR: You need the DocBook XSL Stylesheets version
1.36 or higher
303 to build the documentation.
304 Get a newer version at http://docbook.sourceforge.net/projects/xsl/
309 <!-- generate $book.devhelp2 -->
310 <xsl:call-template name=
"generate.devhelp2"/>
313 <!-- ========================================================= -->
314 <!-- template to output gtkdoclink elements for the unknown targets -->
316 <xsl:template match=
"link">
318 <xsl:when test=
"id(@linkend)">
322 <GTKDOCLINK HREF=
"{@linkend}">
323 <xsl:apply-templates/>
329 <!-- ========================================================= -->
330 <!-- Below are the visual portions of the stylesheet. They provide
331 the normal gtk-doc output style. -->
333 <xsl:param name=
"shade.verbatim" select=
"0"/>
334 <xsl:param name=
"refentry.separator" select=
"0"/>
336 <xsl:template match=
"refsect2">
337 <xsl:if test=
"preceding-sibling::refsect2">
343 <xsl:template name=
"user.head.title">
344 <xsl:param name=
"node" select=
"."/>
345 <xsl:param name=
"title"/>
346 <xsl:variable name=
"home" select=
"/*[1]"/>
348 <xsl:copy-of select=
"$title"/>:
<xsl:apply-templates select=
"$home" mode=
"object.title.markup"/>
352 <xsl:template name=
"user.head.content">
353 <xsl:if test=
"$gtkdoc.version">
354 <meta name=
"generator" content=
"GTK-Doc V{$gtkdoc.version} (XML mode)"/>
356 <link rel=
"stylesheet" href=
"style.css" type=
"text/css"/>
359 <xsl:template name=
"user.footer.content">
363 <xsl:when test=
"$gtkdoc.version">
364 <xsl:text>Generated by GTK-Doc V
</xsl:text><xsl:copy-of select=
"$gtkdoc.version" />
367 <xsl:text>Generated by GTK-Doc
</xsl:text>
373 <xsl:template match=
"title" mode=
"book.titlepage.recto.mode">
374 <table class=
"navigation" id=
"top" width=
"100%"
375 cellpadding=
"2" cellspacing=
"0">
378 <p class=
"{name(.)}">
379 <xsl:value-of select=
"."/>
386 <xsl:template name=
"header.navigation">
387 <xsl:param name=
"prev" select=
"/foo"/>
388 <xsl:param name=
"next" select=
"/foo"/>
389 <xsl:variable name=
"home" select=
"/*[1]"/>
390 <xsl:variable name=
"up" select=
"parent::*"/>
391 <xsl:variable name=
"refsections" select=
"./refsect1[@role]"/>
392 <xsl:variable name=
"glssections" select=
"./glossdiv/title"/>
393 <xsl:variable name=
"idxsections" select=
"./indexdiv/indexdiv/title"/>
394 <xsl:variable name=
"section_id" select=
"./@id"/>
395 <xsl:variable name=
"sect_object_hierarchy" select=
"./refsect1[@role='object_hierarchy']"/>
396 <xsl:variable name=
"sect_impl_interfaces" select=
"./refsect1[@role='impl_interfaces']"/>
397 <xsl:variable name=
"sect_prerequisites" select=
"./refsect1[@role='prerequisites']"/>
398 <xsl:variable name=
"sect_derived_interfaces" select=
"./refsect1[@role='derived_interfaces']"/>
399 <xsl:variable name=
"sect_implementations" select=
"./refsect1[@role='implementations']"/>
400 <xsl:variable name=
"sect_properties" select=
"./refsect1[@role='properties']"/>
401 <xsl:variable name=
"sect_child_properties" select=
"./refsect1[@role='child_properties']"/>
402 <xsl:variable name=
"sect_style_properties" select=
"./refsect1[@role='style_properties']"/>
403 <xsl:variable name=
"sect_signal_proto" select=
"./refsect1[@role='signal_proto']"/>
404 <xsl:variable name=
"sect_desc" select=
"./refsect1[@role='desc']"/>
405 <xsl:variable name=
"sect_synopsis" select=
"./refsynopsisdiv[@role='synopsis']"/>
407 <xsl:variable name="sect_details" select="./refsect1[@id='details']"/>
408 <xsl:variable name="sect_property_details" select="./refsect1[@id='property_details']"/>
409 <xsl:variable name="sect_child_property_details" select="./refsect1[@id='child_property_details']"/>
410 <xsl:variable name="sect_style_property_details" select="./refsect1[@id='style_property_details']"/>
411 <xsl:variable name="sect_signals" select="./refsect1[@id='signals']"/>
414 <xsl:if test=
"$suppress.navigation = '0' and $home != .">
415 <table class=
"navigation" id=
"top" width=
"100%"
416 summary =
"Navigation header" cellpadding=
"2" cellspacing=
"5">
418 <td width=
"100%" align=
"left" class=
"shortcuts">
419 <!--<xsl:if test="name()='refentry'"-->
421 <xsl:when test=
"count($refsections) > 0">
422 <a href=
"#" class=
"shortcut">Top
</a>
423 <xsl:if test=
"count($sect_desc) > 0">
424 <span id=
"nav_description">  <span class=
"dim">|
</span> 
425 <a href=
"#{$section_id}.description" class=
"shortcut">
426 <xsl:value-of select=
"./refsect1[@role='desc']/title"/>
429 <xsl:if test=
"count($sect_object_hierarchy) > 0">
430 <span id=
"nav_hierarchy">  <span class=
"dim">|
</span> 
431 <a href=
"#{$section_id}.object-hierarchy" class=
"shortcut">
432 <xsl:value-of select=
"./refsect1[@role='object_hierarchy']/title"/>
435 <xsl:if test=
"count($sect_impl_interfaces) > 0">
436 <span id=
"nav_interfaces">  <span class=
"dim">|
</span> 
437 <a href=
"#{$section_id}.implemented-interfaces" class=
"shortcut">
438 <xsl:value-of select=
"./refsect1[@role='impl_interfaces']/title"/>
441 <xsl:if test=
"count($sect_prerequisites) > 0">
442 <span id=
"nav_prerequisites">  <span class=
"dim">|
</span> 
443 <a href=
"#{$section_id}.prerequisites" class=
"shortcut">
444 <xsl:value-of select=
"./refsect1[@role='prerequisites']/title"/>
447 <xsl:if test=
"count($sect_derived_interfaces) > 0">
448 <span id=
"nav_derived_interfaces">  <span class=
"dim">|
</span> 
449 <a href=
"#{$section_id}.derived-interfaces" class=
"shortcut">
450 <xsl:value-of select=
"./refsect1[@role='derived_interfaces']/title"/>
453 <xsl:if test=
"count($sect_implementations) > 0">
454 <span id=
"nav_implementations">  <span class=
"dim">|
</span> 
455 <a href=
"#{$section_id}.implementations" class=
"shortcut">
456 <xsl:value-of select=
"./refsect1[@role='implementations']/title"/>
459 <xsl:if test=
"count($sect_properties) > 0">
460 <span id=
"nav_properties">  <span class=
"dim">|
</span> 
461 <a href=
"#{$section_id}.properties" class=
"shortcut">
462 <xsl:value-of select=
"./refsect1[@role='properties']/title"/>
465 <xsl:if test=
"count($sect_child_properties) > 0">
466 <span id=
"nav_child_properties">  <span class=
"dim">|
</span> 
467 <a href=
"#{$section_id}.child-properties" class=
"shortcut">
468 <xsl:value-of select=
"./refsect1[@role='child_properties']/title"/>
471 <xsl:if test=
"count($sect_style_properties) > 0">
472 <span id=
"nav_style_properties">  <span class=
"dim">|
</span> 
473 <a href=
"#{$section_id}.style-properties" class=
"shortcut">
474 <xsl:value-of select=
"./refsect1[@role='style_properties']/title"/>
477 <xsl:if test=
"count($sect_signal_proto) > 0">
478 <span id=
"nav_signals">  <span class=
"dim">|
</span> 
479 <a href=
"#{$section_id}.signals" class=
"shortcut">
480 <xsl:value-of select=
"./refsect1[@role='signal_proto']/title"/>
484 <!-- this is not yet very nice, as it requires all glossdic/indexdiv
485 elements having a anchor element. maybe we can customize the xsl
486 to automaticaly create local anchors
488 <xsl:when test=
"count($glssections) > 0">
489 <span id=
"nav_glossary">
490 <xsl:for-each select=
"./glossdiv">
491 <xsl:if test=
"position() > 1">
492  <span class=
"dim">|
</span> 
495 <xsl:attribute name=
"href">#gls
<xsl:value-of select=
"./title"/></xsl:attribute>
496 <xsl:value-of select=
"./title"/>
501 <xsl:when test=
"count($idxsections) > 0">
502 <span id=
"nav_index">
503 <xsl:for-each select=
"./indexdiv/indexdiv">
504 <xsl:if test=
"position() > 1">
505  <span class=
"dim">|
</span> 
508 <xsl:attribute name=
"href">#idx
<xsl:value-of select=
"./title"/></xsl:attribute>
509 <xsl:value-of select=
"./title"/>
517 <xsl:when test=
"$home != .">
520 <xsl:attribute name=
"href">
521 <xsl:call-template name=
"href.target">
522 <xsl:with-param name=
"object" select=
"$home"/>
525 <img src=
"home.png" width=
"16" height=
"16" border=
"0">
526 <xsl:attribute name=
"alt">
527 <xsl:call-template name=
"gentext">
528 <xsl:with-param name=
"key">nav-home
</xsl:with-param>
540 <xsl:when test=
"count($up) > 0 and $up != $home">
543 <xsl:attribute name=
"href">
544 <xsl:call-template name=
"href.target">
545 <xsl:with-param name=
"object" select=
"$up"/>
548 <img src=
"up.png" width=
"16" height=
"16" border=
"0">
549 <xsl:attribute name=
"alt">
550 <xsl:call-template name=
"gentext">
551 <xsl:with-param name=
"key">nav-up
</xsl:with-param>
559 <td><img src=
"up-insensitive.png" width=
"16" height=
"16" border=
"0"/></td>
563 <xsl:when test=
"count($prev) > 0">
566 <xsl:attribute name=
"href">
567 <xsl:call-template name=
"href.target">
568 <xsl:with-param name=
"object" select=
"$prev"/>
571 <img src=
"left.png" width=
"16" height=
"16" border=
"0">
572 <xsl:attribute name=
"alt">
573 <xsl:call-template name=
"gentext">
574 <xsl:with-param name=
"key">nav-prev
</xsl:with-param>
582 <td><img src=
"left-insensitive.png" width=
"16" height=
"16" border=
"0"/></td>
586 <xsl:when test=
"count($next) > 0">
589 <xsl:attribute name=
"href">
590 <xsl:call-template name=
"href.target">
591 <xsl:with-param name=
"object" select=
"$next"/>
594 <img src=
"right.png" width=
"16" height=
"16" border=
"0">
595 <xsl:attribute name=
"alt">
596 <xsl:call-template name=
"gentext">
597 <xsl:with-param name=
"key">nav-next
</xsl:with-param>
605 <td><img src=
"right-insensitive.png" width=
"16" height=
"16" border=
"0"/></td>
613 <xsl:template name=
"footer.navigation">
616 <!-- avoid creating multiple identical indices
617 if the stylesheets don't support filtered indices
619 <xsl:template match=
"index">
620 <xsl:variable name=
"has-filtered-index">
621 <xsl:call-template name=
"version-greater-or-equal">
622 <xsl:with-param name=
"ver1" select=
"$VERSION" />
623 <xsl:with-param name=
"ver2">1.66</xsl:with-param>
626 <xsl:if test=
"($has-filtered-index = 1) or (count(@role) = 0)">
631 <xsl:template match=
"index" mode=
"toc">
632 <xsl:variable name=
"has-filtered-index">
633 <xsl:call-template name=
"version-greater-or-equal">
634 <xsl:with-param name=
"ver1" select=
"$VERSION" />
635 <xsl:with-param name=
"ver2">1.66</xsl:with-param>
638 <xsl:if test=
"($has-filtered-index = 1) or (count(@role) = 0)">
643 <xsl:template match=
"para">
645 <xsl:when test=
"@role = 'gallery'">
646 <div class=
"container">
647 <div class=
"gallery-spacer"> </div>
648 <xsl:apply-templates mode=
"gallery.mode"/>
649 <div class=
"gallery-spacer"> </div>
657 <!-- FIXME: try if that works too -->
658 <!--xsl:template match="para[@role='gallery']">
659 <div class="container">
660 <div class="gallery-spacer"> </div>
661 <xsl:apply-templates mode="gallery.mode"/>
662 <div class="gallery-spacer"> </div>
668 <xsl:template match="link" mode="gallery.mode">
669 <div class="gallery-float">
670 <xsl:apply-templates select="."/>
674 <!-- add gallery handling to refnamediv template -->
675 <xsl:template match=
"refnamediv">
676 <div class=
"{name(.)}">
678 <tr><td valign=
"top">
679 <xsl:call-template name=
"anchor"/>
681 <xsl:when test=
"$refentry.generate.name != 0">
683 <xsl:call-template name=
"gentext">
684 <xsl:with-param name=
"key" select=
"'RefName'"/>
688 <xsl:when test=
"$refentry.generate.title != 0">
691 <xsl:when test=
"../refmeta/refentrytitle">
692 <xsl:apply-templates select=
"../refmeta/refentrytitle"/>
695 <xsl:apply-templates select=
"refname[1]"/>
702 <xsl:apply-templates/>
705 <td class=
"gallery_image" valign=
"top" align=
"right">
707 <xsl:when test=
"../refmeta/refmiscinfo/inlinegraphic">
708 <xsl:apply-templates select=
"../refmeta/refmiscinfo/inlinegraphic"/>
711 <!-- find the gallery image to use here
712 - determine the id of the enclosing refentry
713 - look for an inlinegraphic inside a link with linkend == refentryid inside a para with role == gallery
716 <xsl:variable name=
"refentryid" select=
"../@id"/>
717 <xsl:apply-templates select=
"key('gallery.key', $refentryid)/inlinegraphic"/>
725 <!-- a copy from refentry.xsl to add the missing mode attribute,
726 see bug/729911, https://sourceforge.net/p/docbook/bugs/1358/
727 fixed in: https://sourceforge.net/p/docbook/code/9962/
729 <xsl:template match=
"refpurpose" mode=
"no.anchor.mode">
730 <xsl:if test=
"node()">
731 <xsl:text> </xsl:text>
732 <xsl:call-template name=
"dingbat">
733 <xsl:with-param name=
"dingbat">em-dash
</xsl:with-param>
735 <xsl:text> </xsl:text>
736 <xsl:apply-templates mode=
"no.anchor.mode"/>
740 <!-- add anchors for index sections -->
741 <xsl:template match=
"indexdiv">
742 <a><xsl:attribute name=
"name">idx
<xsl:value-of select=
"./title"/></xsl:attribute></a>
743 <xsl:apply-templates/>
746 <!-- add anchors for glossary sections -->
747 <xsl:template match=
"glossdiv">
748 <a><xsl:attribute name=
"name">gls
<xsl:value-of select=
"./title"/></xsl:attribute></a>
749 <xsl:apply-templates/>
752 <!-- Exterminate any trace of indexterms in the main flow -->
753 <xsl:template match=
"indexterm">
756 <!-- Extra link on the right side of doc-blobs -->
757 <xsl:template name=
"user.format.extralinks">
758 <xsl:if test=
"../ulink[@role='extralinks']">
759 <span class=
"extralinks">
760 <xsl:for-each select=
"../ulink[@role='extralinks']">
761 <xsl:if test=
"position() = 1">[
 </xsl:if>
762 <xsl:if test=
"position() > 1">  <span class=
"dim">|
</span> </xsl:if>
764 <xsl:attribute name=
"href"><xsl:value-of select=
"@url"/></xsl:attribute>
765 <xsl:copy-of select=
"text()" />
767 <xsl:if test=
"position() = last()">  ]
</xsl:if>
771 <!--xsl:copy-of select="text()" /-->
772 <xsl:apply-templates/>
775 <!-- this is not in use yet (see gtkdoc-mkdb
776 <xsl:template match="//refsect2/ulink[@role='extralinks']"/>
777 <xsl:template match="//refsect1/ulink[@role='extralinks']"/>
779 <xsl:template match="//refsect2/title">
780 <h3><xsl:call-template name="user.format.extralinks"/></h3>
783 <xsl:template match="//refsect1/title">
784 <h2><xsl:call-template name="user.format.extralinks"/></h2>
788 <!-- ==================================================================== -->
790 <xsl:template match=
"acronym">
791 <xsl:call-template name=
"generate.acronym.link"/>
794 <xsl:template name=
"generate.acronym.link">
795 <xsl:param name=
"acronym">
796 <xsl:apply-templates/>
798 <xsl:param name=
"value" >
799 <xsl:value-of select=
"key('acronym.key', $acronym)/../glossdef/para[1]" />
802 <xsl:when test=
"$value=''">
805 In gtk-doc.xsl: For acronym (
<xsl:value-of select=
"$acronym"/>) no value found!
808 <xsl:attribute name=
"href">
809 <xsl:text>http://foldoc.org/
</xsl:text>
810 <xsl:value-of select=
"$acronym"/>
812 <xsl:call-template name=
"inline.charseq"/>
818 <xsl:attribute name=
"title">
819 <xsl:value-of select=
"$value"/>
821 <xsl:call-template name=
"inline.charseq"/>