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"
15 match=
"glossentry/glossterm"
17 <xsl:key name=
"gallery.key"
18 match=
"para[@role='gallery']/link"
21 <!-- change some parameters -->
22 <!-- http://docbook.sourceforge.net/release/xsl/current/doc/html/index.html -->
23 <xsl:param name=
"toc.section.depth">2</xsl:param>
24 <xsl:param name=
"generate.toc">
33 <xsl:param name=
"chunker.output.encoding" select=
"'UTF-8'"/>
34 <xsl:param name=
"chunker.output.indent" select=
"'yes'"/>
35 <xsl:param name=
"chunker.output.doctype-public" select=
"'-//W3C//DTD HTML 4.01 Transitional//EN'"/>
36 <xsl:param name=
"chunk.fast" select=
"1"/>
38 <xsl:param name=
"default.encoding" select=
"'UTF-8'"/>
39 <xsl:param name=
"chapter.autolabel" select=
"0"/>
40 <xsl:param name=
"use.id.as.filename" 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 <!-- ========================================================= -->
65 <!-- l10n is slow, we don't ue it, so we'd like to turn it off
66 this atleast avoid the re-evaluation -->
67 <xsl:template name=
"l10n.language">en
</xsl:template>
69 <xsl:param name=
"gtkdoc.l10n.xml" select=
"document('http://docbook.sourceforge.net/release/xsl/current/common/en.xml')"/>
71 <xsl:key name=
"gtkdoc.gentext.key"
72 match=
"l:gentext[@key]"
74 <xsl:key name=
"gtkdoc.context.key"
75 match=
"l:context[@name]"
78 <xsl:template name=
"gentext">
79 <xsl:param name=
"key" select=
"local-name(.)"/>
81 <xsl:for-each select=
"$gtkdoc.l10n.xml">
82 <xsl:variable name=
"l10n.gentext" select=
"key('gtkdoc.gentext.key', $key)"/>
85 <xsl:when test=
"$l10n.gentext">
86 <xsl:value-of select=
"$l10n.gentext/@text"/>
90 <xsl:text>No
"en" localization of
"</xsl:text>
91 <xsl:value-of select="$key
"/>
92 <xsl:text>" exists.
</xsl:text>
99 <xsl:template name=
"gentext.dingbat">
100 <xsl:param name=
"dingbat">bullet
</xsl:param>
102 <xsl:variable name=
"l10n.dingbat"
103 select=
"($gtkdoc.l10n.xml/l:l10n/l:dingbat[@key=$dingbat])[1]"/>
106 <xsl:when test=
"$l10n.dingbat">
107 <xsl:value-of select=
"$l10n.dingbat/@text"/>
111 <xsl:text>No
"en" localization of dingbat
</xsl:text>
112 <xsl:value-of select=
"$dingbat"/>
113 <xsl:text> exists; using
"en".
</xsl:text>
119 <xsl:template name=
"gentext.template">
120 <xsl:param name=
"context" select=
"'default'"/>
121 <xsl:param name=
"name" select=
"'default'"/>
122 <xsl:param name=
"origname" select=
"$name"/>
124 <!-- cut leading / if any to avoid one recursion -->
125 <xsl:variable name=
"rname">
127 <xsl:when test=
"starts-with($name, '/')">
128 <xsl:value-of select=
"substring-after($name, '/')"/>
131 <xsl:value-of select=
"$name"/>
136 <!-- this is called with context="title|title-numbered|title-unnumbered>
138 <xsl:text>context:</xsl:text><xsl:value-of select="$context"/>
139 <xsl:text>;name:</xsl:text><xsl:value-of select="$rname"/>
140 <xsl:text>;origname:</xsl:text><xsl:value-of select="$origname"/>
143 see html/html.xsl:<xsl:template match="*" mode="html.title.attribute">
146 <xsl:for-each select=
"$gtkdoc.l10n.xml">
147 <xsl:variable name=
"context.node" select=
"key('gtkdoc.context.key', $context)"/>
148 <xsl:variable name=
"template.node"
149 select=
"($context.node/l:template[@name=$rname])[1]"/>
152 <xsl:when test=
"$template.node/@text">
153 <xsl:value-of select=
"$template.node/@text"/>
156 <xsl:text>=</xsl:text><xsl:value-of select="$template.node/@text"/>
162 <xsl:when test=
"contains($rname, '/')">
163 <xsl:call-template name=
"gentext.template">
164 <xsl:with-param name=
"context" select=
"$context"/>
165 <xsl:with-param name=
"name" select=
"substring-after($rname, '/')"/>
166 <xsl:with-param name=
"origname" select=
"$origname"/>
175 <!-- silently test whether a gentext template exists -->
176 <xsl:template name=
"gentext.template.exists">
177 <xsl:param name=
"context" select=
"'default'"/>
178 <xsl:param name=
"name" select=
"'default'"/>
179 <xsl:param name=
"origname" select=
"$name"/>
181 <xsl:variable name=
"template">
182 <xsl:call-template name=
"gentext.template">
183 <xsl:with-param name=
"context" select=
"$context"/>
184 <xsl:with-param name=
"name" select=
"$name"/>
185 <xsl:with-param name=
"origname" select=
"$origname"/>
190 <xsl:when test=
"string-length($template) != 0">1</xsl:when>
191 <xsl:otherwise>0</xsl:otherwise>
195 <!-- shortcut version -->
196 <!-- @bug: https://bugzilla.gnome.org/show_bug.cgi?id=617478 -->
197 <xsl:template name=
"generate.html.title"/>
198 <!--xsl:template name="generate.html.title">
199 <xsl:variable name="has.title.markup">
200 <xsl:apply-templates select="." mode="title.markup">
201 <xsl:with-param name="verbose" select="0"/>
202 </xsl:apply-templates>
204 <xsl:if test="$has.title.markup != '???TITLE???'">
205 <xsl:variable name="gentext.title">
206 <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
209 <xsl:when test="string-length($gentext.title) != 0">
210 <xsl:attribute name="title">
211 <xsl:value-of select="$gentext.title"/>
214 <xsl:when test="alt">
215 <xsl:attribute name="title">
216 <xsl:value-of select="normalize-space(alt)"/>
223 <!-- Generate a title attribute for the context node (e.g. links) -->
224 <xsl:template match=
"*" mode=
"html.title.attribute">
225 <xsl:variable name=
"has.title.markup">
226 <xsl:apply-templates select=
"." mode=
"title.markup">
227 <xsl:with-param name=
"verbose" select=
"0"/>
228 </xsl:apply-templates>
230 <xsl:if test=
"$has.title.markup != '???TITLE???'">
231 <xsl:variable name=
"is.title">
232 <xsl:call-template name=
"gentext.template.exists">
233 <xsl:with-param name=
"context" select=
"'title'"/>
234 <xsl:with-param name=
"name" select=
"local-name(.)"/>
235 <xsl:with-param name=
"lang">
236 <xsl:call-template name=
"l10n.language"/>
241 <xsl:variable name=
"is.title-numbered">
242 <xsl:if test=
"$is.title = 0">
243 <xsl:call-template name=
"gentext.template.exists">
244 <xsl:with-param name=
"context" select=
"'title-numbered'"/>
245 <xsl:with-param name=
"name" select=
"local-name(.)"/>
246 <xsl:with-param name=
"lang">
247 <xsl:call-template name=
"l10n.language"/>
254 <xsl:variable name=
"is.title-unnumbered">
255 <xsl:if test=
"$is.title = 0 and $is.title-numbered = 0">
256 <xsl:call-template name=
"gentext.template.exists">
257 <xsl:with-param name=
"context" select=
"'title-unnumbered'"/>
258 <xsl:with-param name=
"name" select=
"local-name(.)"/>
259 <xsl:with-param name=
"lang">
260 <xsl:call-template name=
"l10n.language"/>
266 <xsl:variable name=
"gentext.title">
267 <xsl:if test=
"$is.title != 0 or
268 $is.title-numbered != 0 or
269 $is.title-unnumbered != 0">
270 <xsl:apply-templates select=
"."
271 mode=
"object.title.markup.textonly"/>
276 <xsl:when test=
"string-length($gentext.title) != 0">
277 <xsl:attribute name=
"title">
278 <xsl:value-of select=
"$gentext.title"/>
281 <xsl:when test=
"alt">
282 <xsl:attribute name=
"title">
283 <xsl:value-of select=
"normalize-space(alt)"/>
293 <!-- ========================================================= -->
294 <!-- template to create the index.sgml anchor index -->
296 <xsl:template match=
"book|article">
297 <xsl:variable name=
"tooldver">
298 <xsl:call-template name=
"version-greater-or-equal">
299 <xsl:with-param name=
"ver1" select=
"$VERSION" />
300 <xsl:with-param name=
"ver2">1.36</xsl:with-param>
303 <xsl:if test=
"$tooldver = 0">
304 <xsl:message terminate=
"yes">
305 FATAL-ERROR: You need the DocBook XSL Stylesheets version
1.36 or higher
306 to build the documentation.
307 Get a newer version at http://docbook.sourceforge.net/projects/xsl/
312 <!-- generate the index.sgml href index -->
313 <xsl:call-template name=
"generate.index"/>
314 <!-- generate $book.devhelp2 -->
315 <xsl:call-template name=
"generate.devhelp2"/>
318 <xsl:template name=
"generate.index">
319 <xsl:call-template name=
"write.text.chunk">
320 <xsl:with-param name=
"filename" select=
"'index.sgml'"/>
321 <xsl:with-param name=
"content">
322 <xsl:apply-templates select=
"/book/bookinfo/releaseinfo/ulink"
323 mode=
"generate.index.mode"/>
324 <!-- check all anchor and refentry elements -->
326 The obvious way to write this is //anchor|//refentry|etc...
327 The obvious way is slow because it causes multiple traversals
328 in libxslt. This take about half the time.
330 <xsl:apply-templates select=
"//*[name()='anchor' or name()='refentry' or name()='refsect1' or
331 name() = 'refsect2' or name()='refsynopsisdiv' or
332 name()='varlistentry']"
333 mode=
"generate.index.mode"/>
335 <xsl:with-param name=
"default.encoding" select=
"'UTF-8'"/>
336 <xsl:with-param name=
"chunker.output.indent" select=
"'no'"/>
340 <xsl:template match=
"*" mode=
"generate.index.mode">
341 <xsl:if test=
"not(@href) and count(@id) > 0">
342 <xsl:text><ANCHOR id=
"</xsl:text>
343 <xsl:value-of select=
"@id"/>
344 <xsl:text>" href=
"</xsl:text>
345 <xsl:if test=
"$gtkdoc.bookname">
346 <xsl:value-of select=
"$gtkdoc.bookname"/>
347 <xsl:text>/
</xsl:text>
349 <xsl:call-template name=
"href.target"/>
350 <xsl:text>"> </xsl:text>
354 <xsl:template match=
"/book/bookinfo/releaseinfo/ulink" mode=
"generate.index.mode">
355 <xsl:if test=
"@role='online-location'">
356 <xsl:text><ONLINE href=
"</xsl:text>
357 <xsl:value-of select=
"@url"/>
358 <xsl:text>"> </xsl:text>
362 <!-- ========================================================= -->
363 <!-- template to output gtkdoclink elements for the unknown targets -->
365 <xsl:template match=
"link">
367 <xsl:when test=
"id(@linkend)">
371 <GTKDOCLINK HREF=
"{@linkend}">
372 <xsl:apply-templates/>
378 <!-- ========================================================= -->
379 <!-- Below are the visual portions of the stylesheet. They provide
380 the normal gtk-doc output style. -->
382 <xsl:param name=
"shade.verbatim" select=
"0"/>
383 <xsl:param name=
"refentry.separator" select=
"0"/>
385 <xsl:template match=
"refsect2">
386 <xsl:if test=
"preceding-sibling::refsect2">
392 <xsl:template name=
"user.head.content">
393 <xsl:if test=
"$gtkdoc.version">
394 <meta name=
"generator" content=
"GTK-Doc V{$gtkdoc.version} (XML mode)"/>
396 <link rel=
"stylesheet" href=
"style.css" type=
"text/css"/>
399 <xsl:template name=
"user.footer.content">
403 <xsl:when test=
"$gtkdoc.version">
404 Generated by GTK-Doc V
<xsl:copy-of select=
"$gtkdoc.version" />
413 <xsl:template match=
"title" mode=
"book.titlepage.recto.mode">
414 <table class=
"navigation" id=
"top" width=
"100%"
415 cellpadding=
"2" cellspacing=
"0">
418 <p class=
"{name(.)}">
419 <xsl:value-of select=
"."/>
426 <xsl:template name=
"header.navigation">
427 <xsl:param name=
"prev" select=
"/foo"/>
428 <xsl:param name=
"next" select=
"/foo"/>
429 <xsl:variable name=
"home" select=
"/*[1]"/>
430 <xsl:variable name=
"up" select=
"parent::*"/>
431 <xsl:variable name=
"refsections" select=
"./refsect1[@role]"/>
432 <xsl:variable name=
"glssections" select=
"./glossdiv/title"/>
433 <xsl:variable name=
"idxsections" select=
"./indexdiv/indexdiv/title"/>
434 <xsl:variable name=
"section_id" select=
"./@id"/>
435 <xsl:variable name=
"sect_object_hierarchy" select=
"./refsect1[@role='object_hierarchy']"/>
436 <xsl:variable name=
"sect_impl_interfaces" select=
"./refsect1[@role='impl_interfaces']"/>
437 <xsl:variable name=
"sect_prerequisites" select=
"./refsect1[@role='prerequisites']"/>
438 <xsl:variable name=
"sect_derived_interfaces" select=
"./refsect1[@role='derived_interfaces']"/>
439 <xsl:variable name=
"sect_implementations" select=
"./refsect1[@role='implementations']"/>
440 <xsl:variable name=
"sect_properties" select=
"./refsect1[@role='properties']"/>
441 <xsl:variable name=
"sect_child_properties" select=
"./refsect1[@role='child_properties']"/>
442 <xsl:variable name=
"sect_style_properties" select=
"./refsect1[@role='style_properties']"/>
443 <xsl:variable name=
"sect_signal_proto" select=
"./refsect1[@role='signal_proto']"/>
444 <xsl:variable name=
"sect_desc" select=
"./refsect1[@role='desc']"/>
445 <xsl:variable name=
"sect_synopsis" select=
"./refsynopsisdiv[@role='synopsis']"/>
447 <xsl:variable name="sect_details" select="./refsect1[@id='details']"/>
448 <xsl:variable name="sect_property_details" select="./refsect1[@id='property_details']"/>
449 <xsl:variable name="sect_child_property_details" select="./refsect1[@id='child_property_details']"/>
450 <xsl:variable name="sect_style_property_details" select="./refsect1[@id='style_property_details']"/>
451 <xsl:variable name="sect_signals" select="./refsect1[@id='signals']"/>
454 <xsl:if test=
"$suppress.navigation = '0' and $home != .">
455 <table class=
"navigation" id=
"top" width=
"100%"
456 summary =
"Navigation header" cellpadding=
"2" cellspacing=
"2">
459 <xsl:when test=
"count($prev) > 0">
462 <xsl:attribute name=
"href">
463 <xsl:call-template name=
"href.target">
464 <xsl:with-param name=
"object" select=
"$prev"/>
467 <img src=
"left.png" width=
"24" height=
"24" border=
"0">
468 <xsl:attribute name=
"alt">
469 <xsl:call-template name=
"gentext">
470 <xsl:with-param name=
"key">nav-prev
</xsl:with-param>
482 <xsl:when test=
"count($up) > 0 and $up != $home">
485 <xsl:attribute name=
"href">
486 <xsl:call-template name=
"href.target">
487 <xsl:with-param name=
"object" select=
"$up"/>
490 <img src=
"up.png" width=
"24" height=
"24" border=
"0">
491 <xsl:attribute name=
"alt">
492 <xsl:call-template name=
"gentext">
493 <xsl:with-param name=
"key">nav-up
</xsl:with-param>
505 <xsl:when test=
"$home != .">
508 <xsl:attribute name=
"href">
509 <xsl:call-template name=
"href.target">
510 <xsl:with-param name=
"object" select=
"$home"/>
513 <img src=
"home.png" width=
"24" height=
"24" border=
"0">
514 <xsl:attribute name=
"alt">
515 <xsl:call-template name=
"gentext">
516 <xsl:with-param name=
"key">nav-home
</xsl:with-param>
527 <th width=
"100%" align=
"center">
528 <xsl:apply-templates select=
"$home" mode=
"object.title.markup"/>
531 <xsl:when test=
"count($next) > 0">
534 <xsl:attribute name=
"href">
535 <xsl:call-template name=
"href.target">
536 <xsl:with-param name=
"object" select=
"$next"/>
539 <img src=
"right.png" width=
"24" height=
"24" border=
"0">
540 <xsl:attribute name=
"alt">
541 <xsl:call-template name=
"gentext">
542 <xsl:with-param name=
"key">nav-next
</xsl:with-param>
554 <!--<xsl:if test="name()='refentry'"-->
556 <xsl:when test=
"count($refsections) > 0">
558 <td colspan=
"5" class=
"shortcuts">
559 <xsl:if test=
"count($sect_synopsis) > 0">
560 <a href=
"#{$section_id}.synopsis" class=
"shortcut">Top
</a>
562 <xsl:if test=
"count($sect_desc) > 0">
564 <a href=
"#{$section_id}.description" class=
"shortcut">
565 <xsl:value-of select=
"./refsect1[@role='desc']/title"/>
568 <xsl:if test=
"count($sect_object_hierarchy) > 0">
570 <a href=
"#{$section_id}.object-hierarchy" class=
"shortcut">
571 <xsl:value-of select=
"./refsect1[@role='object_hierarchy']/title"/>
574 <xsl:if test=
"count($sect_impl_interfaces) > 0">
576 <a href=
"#{$section_id}.implemented-interfaces" class=
"shortcut">
577 <xsl:value-of select=
"./refsect1[@role='impl_interfaces']/title"/>
580 <xsl:if test=
"count($sect_prerequisites) > 0">
582 <a href=
"#{$section_id}.prerequisites" class=
"shortcut">
583 <xsl:value-of select=
"./refsect1[@role='prerequisites']/title"/>
586 <xsl:if test=
"count($sect_derived_interfaces) > 0">
588 <a href=
"#{$section_id}.derived-interfaces" class=
"shortcut">
589 <xsl:value-of select=
"./refsect1[@role='derived_interfaces']/title"/>
592 <xsl:if test=
"count($sect_implementations) > 0">
594 <a href=
"#{$section_id}.implementations" class=
"shortcut">
595 <xsl:value-of select=
"./refsect1[@role='implementations']/title"/>
598 <xsl:if test=
"count($sect_properties) > 0">
600 <a href=
"#{$section_id}.properties" class=
"shortcut">
601 <xsl:value-of select=
"./refsect1[@role='properties']/title"/>
604 <xsl:if test=
"count($sect_child_properties) > 0">
606 <a href=
"#{$section_id}.child-properties" class=
"shortcut">
607 <xsl:value-of select=
"./refsect1[@role='child_properties']/title"/>
610 <xsl:if test=
"count($sect_style_properties) > 0">
612 <a href=
"#{$section_id}.style-properties" class=
"shortcut">
613 <xsl:value-of select=
"./refsect1[@role='style_properties']/title"/>
616 <xsl:if test=
"count($sect_signal_proto) > 0">
618 <a href=
"#{$section_id}.signals" class=
"shortcut">
619 <xsl:value-of select=
"./refsect1[@role='signal_proto']/title"/>
623 <xsl:if test="count($sect_details) > 0">
624 <a href="#details" class="shortcut">
625 <xsl:value-of select="./refsect1[@id='details']/title"/>
629 <xsl:if test="count($sect_property_details) > 0">
630 <a href="#property_details" class="shortcut">
631 <xsl:value-of select="./refsect1[@id='property_details']/title"/>
635 <xsl:if test="count($sect_child_property_details) > 0">
636 <a href="#child_property_details" class="shortcut">
637 <xsl:value-of select="./refsect1[@id='property_child_details']/title"/>
641 <xsl:if test="count($sect_style_property_details) > 0">
642 <a href="#style_property_details" class="shortcut">
643 <xsl:value-of select="./refsect1[@id='style_property_details']/title"/>
647 <xsl:if test="count($sect_signals) > 0">
648 <a href="#signals" class="shortcut">
649 <xsl:value-of select="./refsect1[@id='signals']/title"/>
657 <!-- this is not yet very nice, as it requires all glossdic/indexdiv
658 elements having a anchor element. maybe we can customize the xsl
659 to automaticaly create local anchors
661 <xsl:when test=
"count($glssections) > 0">
663 <td colspan=
"5" class=
"shortcuts">
664 <xsl:for-each select=
"./glossdiv">
665 <xsl:if test=
"position() > 1">
669 <xsl:attribute name=
"href">#gls
<xsl:value-of select=
"./title"/></xsl:attribute>
670 <xsl:value-of select=
"./title"/>
676 <xsl:when test=
"count($idxsections) > 0">
678 <td colspan=
"5" class=
"shortcuts">
679 <xsl:for-each select=
"./indexdiv/indexdiv">
680 <xsl:if test=
"position() > 1">
684 <xsl:attribute name=
"href">#idx
<xsl:value-of select=
"./title"/></xsl:attribute>
685 <xsl:value-of select=
"./title"/>
696 <xsl:template name=
"footer.navigation">
699 <!-- avoid creating multiple identical indices
700 if the stylesheets don't support filtered indices
702 <xsl:template match=
"index">
703 <xsl:variable name=
"has-filtered-index">
704 <xsl:call-template name=
"version-greater-or-equal">
705 <xsl:with-param name=
"ver1" select=
"$VERSION" />
706 <xsl:with-param name=
"ver2">1.66</xsl:with-param>
709 <xsl:if test=
"($has-filtered-index = 1) or (count(@role) = 0)">
714 <xsl:template match=
"index" mode=
"toc">
715 <xsl:variable name=
"has-filtered-index">
716 <xsl:call-template name=
"version-greater-or-equal">
717 <xsl:with-param name=
"ver1" select=
"$VERSION" />
718 <xsl:with-param name=
"ver2">1.66</xsl:with-param>
721 <xsl:if test=
"($has-filtered-index = 1) or (count(@role) = 0)">
726 <xsl:template match=
"para">
728 <xsl:when test=
"@role = 'gallery'">
729 <div class=
"container">
730 <div class=
"gallery-spacer"> </div>
731 <xsl:apply-templates mode=
"gallery.mode"/>
732 <div class=
"gallery-spacer"> </div>
740 <!-- FIXME: try if that works too -->
741 <!--xsl:template match="para[@role='gallery']">
742 <div class="container">
743 <div class="gallery-spacer"> </div>
744 <xsl:apply-templates mode="gallery.mode"/>
745 <div class="gallery-spacer"> </div>
751 <xsl:template match="link" mode="gallery.mode">
752 <div class="gallery-float">
753 <xsl:apply-templates select="."/>
757 <!-- add gallery handling to refnamediv template -->
758 <xsl:template match=
"refnamediv">
759 <div class=
"{name(.)}">
761 <tr><td valign=
"top">
762 <xsl:call-template name=
"anchor"/>
764 <xsl:when test=
"$refentry.generate.name != 0">
766 <xsl:call-template name=
"gentext">
767 <xsl:with-param name=
"key" select=
"'RefName'"/>
771 <xsl:when test=
"$refentry.generate.title != 0">
774 <xsl:when test=
"../refmeta/refentrytitle">
775 <xsl:apply-templates select=
"../refmeta/refentrytitle"/>
778 <xsl:apply-templates select=
"refname[1]"/>
785 <xsl:apply-templates/>
788 <td valign=
"top" align=
"right">
790 <xsl:when test=
"../refmeta/refmiscinfo/inlinegraphic">
791 <xsl:apply-templates select=
"../refmeta/refmiscinfo/inlinegraphic"/>
794 <!-- find the gallery image to use here
795 - determine the id of the enclosing refentry
796 - look for an inlinegraphic inside a link with linkend == refentryid inside a para with role == gallery
799 <xsl:variable name=
"refentryid" select=
"../@id"/>
800 <xsl:apply-templates select=
"key('gallery.key', $refentryid)/inlinegraphic"/>
808 <!-- add anchors for index sections -->
809 <xsl:template match=
"indexdiv">
810 <a><xsl:attribute name=
"name">idx
<xsl:value-of select=
"./title"/></xsl:attribute></a>
811 <xsl:apply-templates/>
814 <!-- add anchors for glossary sections -->
815 <xsl:template match=
"glossdiv">
816 <a><xsl:attribute name=
"name">gls
<xsl:value-of select=
"./title"/></xsl:attribute></a>
817 <xsl:apply-templates/>
820 <!-- Exterminate any trace of indexterms in the main flow -->
821 <xsl:template match=
"indexterm">
824 <!-- Extra link on the right side of doc-blobs -->
825 <xsl:template name=
"user.format.extralinks">
826 <xsl:if test=
"../ulink[@role='extralinks']">
827 <span class=
"extralinks">
828 <xsl:for-each select=
"../ulink[@role='extralinks']">
829 <xsl:if test=
"position() = 1">[
 </xsl:if>
830 <xsl:if test=
"position() > 1"> |
 </xsl:if>
832 <xsl:attribute name=
"href"><xsl:value-of select=
"@url"/></xsl:attribute>
833 <xsl:copy-of select=
"text()" />
835 <xsl:if test=
"position() = last()"> ]
</xsl:if>
839 <!--xsl:copy-of select="text()" /-->
840 <xsl:apply-templates/>
843 <!-- this is not in use yet (see gtkdoc-mkdb
844 <xsl:template match="//refsect2/ulink[@role='extralinks']"/>
845 <xsl:template match="//refsect1/ulink[@role='extralinks']"/>
847 <xsl:template match="//refsect2/title">
848 <h3><xsl:call-template name="user.format.extralinks"/></h3>
851 <xsl:template match="//refsect1/title">
852 <h2><xsl:call-template name="user.format.extralinks"/></h2>
856 <!-- ==================================================================== -->
858 <xsl:template match=
"acronym">
859 <xsl:call-template name=
"generate.acronym.link"/>
862 <xsl:template name=
"generate.acronym.link">
863 <xsl:param name=
"acronym">
864 <xsl:apply-templates/>
867 We use for-each to change context to the database document because key()
868 only locates elements in the same document as the context node!
871 <xsl:param name=
"value" >
872 <xsl:value-of select=
"key('acronym.key', $acronym)/../glossdef/para[1]" />
875 <xsl:when test=
"$value=''">
878 In gtk-doc.xsl: For acronym (
<xsl:value-of select=
"$acronym"/>) no value found!
881 <xsl:attribute name=
"href">
882 <xsl:text>http://foldoc.org/
</xsl:text>
883 <xsl:value-of select=
"$acronym"/>
885 <xsl:call-template name=
"inline.charseq"/>
891 <xsl:attribute name=
"title">
892 <xsl:value-of select=
"$value"/>
894 <xsl:call-template name=
"inline.charseq"/>