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/xhtml/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=
"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=
"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 <!-- ========================================================= -->
64 <!-- l10n is slow, we don't ue it, so we'd like to turn it off
65 this atleast avoid the re-evaluation -->
66 <xsl:template name=
"l10n.language">en
</xsl:template>
68 <xsl:param name=
"gtkdoc.l10n.xml" select=
"document('http://docbook.sourceforge.net/release/xsl/current/common/en.xml')"/>
70 <xsl:key name=
"gtkdoc.gentext.key"
71 match=
"l:gentext[@key]"
73 <xsl:key name=
"gtkdoc.context.key"
74 match=
"l:context[@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"/>
253 <xsl:variable name=
"is.title-unnumbered">
254 <xsl:if test=
"$is.title = 0 and $is.title-numbered = 0">
255 <xsl:call-template name=
"gentext.template.exists">
256 <xsl:with-param name=
"context" select=
"'title-unnumbered'"/>
257 <xsl:with-param name=
"name" select=
"local-name(.)"/>
258 <xsl:with-param name=
"lang">
259 <xsl:call-template name=
"l10n.language"/>
265 <xsl:variable name=
"gentext.title">
266 <xsl:if test=
"$is.title != 0 or
267 $is.title-numbered != 0 or
268 $is.title-unnumbered != 0">
269 <xsl:apply-templates select=
"."
270 mode=
"object.title.markup.textonly"/>
275 <xsl:when test=
"string-length($gentext.title) != 0">
276 <xsl:attribute name=
"title">
277 <xsl:value-of select=
"$gentext.title"/>
280 <xsl:when test=
"alt">
281 <xsl:attribute name=
"title">
282 <xsl:value-of select=
"normalize-space(alt)"/>
292 <!-- ========================================================= -->
293 <!-- template to create the index.sgml anchor index -->
295 <xsl:template match=
"book|article">
296 <xsl:variable name=
"tooldver">
297 <xsl:call-template name=
"version-greater-or-equal">
298 <xsl:with-param name=
"ver1" select=
"$VERSION" />
299 <xsl:with-param name=
"ver2">1.36</xsl:with-param>
302 <xsl:if test=
"$tooldver = 0">
303 <xsl:message terminate=
"yes">
304 FATAL-ERROR: You need the DocBook XSL Stylesheets version
1.36 or higher
305 to build the documentation.
306 Get a newer version at http://docbook.sourceforge.net/projects/xsl/
311 <!-- generate the index.sgml href index -->
312 <xsl:call-template name=
"generate.index"/>
313 <!-- generate $book.devhelp2 -->
314 <xsl:call-template name=
"generate.devhelp2"/>
317 <xsl:template name=
"generate.index">
318 <xsl:call-template name=
"write.text.chunk">
319 <xsl:with-param name=
"filename" select=
"'index.sgml'"/>
320 <xsl:with-param name=
"content">
321 <xsl:apply-templates select=
"/book/bookinfo/releaseinfo/ulink"
322 mode=
"generate.index.mode"/>
323 <!-- check all anchor and refentry elements -->
325 The obvious way to write this is //anchor|//refentry|etc...
326 The obvious way is slow because it causes multiple traversals
327 in libxslt. This take about half the time.
329 <xsl:apply-templates select=
"//*[name()='anchor' or name()='refentry' or name()='refsect1' or
330 name() = 'refsect2' or name()='refsynopsisdiv' or
331 name()='varlistentry']"
332 mode=
"generate.index.mode"/>
334 <xsl:with-param name=
"default.encoding" select=
"'UTF-8'"/>
335 <xsl:with-param name=
"chunker.output.indent" select=
"'no'"/>
339 <xsl:template match=
"*" mode=
"generate.index.mode">
340 <xsl:if test=
"not(@href) and count(@id) > 0">
341 <xsl:text><ANCHOR id=
"</xsl:text>
342 <xsl:value-of select=
"@id"/>
343 <xsl:text>" href=
"</xsl:text>
344 <xsl:if test=
"$gtkdoc.bookname">
345 <xsl:value-of select=
"$gtkdoc.bookname"/>
346 <xsl:text>/
</xsl:text>
348 <xsl:call-template name=
"href.target"/>
349 <xsl:text>"> </xsl:text>
353 <xsl:template match=
"/book/bookinfo/releaseinfo/ulink" mode=
"generate.index.mode">
354 <xsl:if test=
"@role='online-location'">
355 <xsl:text><ONLINE href=
"</xsl:text>
356 <xsl:value-of select=
"@url"/>
357 <xsl:text>"> </xsl:text>
361 <!-- ========================================================= -->
362 <!-- template to output gtkdoclink elements for the unknown targets -->
364 <xsl:template match=
"link">
366 <xsl:when test=
"id(@linkend)">
370 <GTKDOCLINK HREF=
"{@linkend}">
371 <xsl:apply-templates/>
377 <!-- ========================================================= -->
378 <!-- Below are the visual portions of the stylesheet. They provide
379 the normal gtk-doc output style. -->
381 <xsl:param name=
"shade.verbatim" select=
"0"/>
382 <xsl:param name=
"refentry.separator" select=
"0"/>
384 <xsl:template match=
"refsect2">
385 <xsl:if test=
"preceding-sibling::refsect2">
391 <xsl:template name=
"user.head.content">
392 <xsl:if test=
"$gtkdoc.version">
393 <meta name=
"generator" content=
"GTK-Doc V{$gtkdoc.version} (XML mode)"/>
395 <link rel=
"stylesheet" href=
"style.css" type=
"text/css"/>
398 <xsl:template name=
"user.footer.content">
402 <xsl:when test=
"$gtkdoc.version">
403 Generated by GTK-Doc V
<xsl:copy-of select=
"$gtkdoc.version" />
412 <xsl:template match=
"title" mode=
"book.titlepage.recto.mode">
413 <table class=
"navigation" id=
"top" width=
"100%"
414 cellpadding=
"2" cellspacing=
"0">
417 <p class=
"{name(.)}">
418 <xsl:value-of select=
"."/>
425 <xsl:template name=
"header.navigation">
426 <xsl:param name=
"prev" select=
"/foo"/>
427 <xsl:param name=
"next" select=
"/foo"/>
428 <xsl:variable name=
"home" select=
"/*[1]"/>
429 <xsl:variable name=
"up" select=
"parent::*"/>
430 <xsl:variable name=
"refsections" select=
"./refsect1[@role]"/>
431 <xsl:variable name=
"glssections" select=
"./glossdiv/title"/>
432 <xsl:variable name=
"idxsections" select=
"./indexdiv/indexdiv/title"/>
433 <xsl:variable name=
"section_id" select=
"./@id"/>
434 <xsl:variable name=
"sect_object_hierarchy" select=
"./refsect1[@role='object_hierarchy']"/>
435 <xsl:variable name=
"sect_impl_interfaces" select=
"./refsect1[@role='impl_interfaces']"/>
436 <xsl:variable name=
"sect_prerequisites" select=
"./refsect1[@role='prerequisites']"/>
437 <xsl:variable name=
"sect_derived_interfaces" select=
"./refsect1[@role='derived_interfaces']"/>
438 <xsl:variable name=
"sect_implementations" select=
"./refsect1[@role='implementations']"/>
439 <xsl:variable name=
"sect_properties" select=
"./refsect1[@role='properties']"/>
440 <xsl:variable name=
"sect_child_properties" select=
"./refsect1[@role='child_properties']"/>
441 <xsl:variable name=
"sect_style_properties" select=
"./refsect1[@role='style_properties']"/>
442 <xsl:variable name=
"sect_signal_proto" select=
"./refsect1[@role='signal_proto']"/>
443 <xsl:variable name=
"sect_desc" select=
"./refsect1[@role='desc']"/>
444 <xsl:variable name=
"sect_synopsis" select=
"./refsynopsisdiv[@role='synopsis']"/>
446 <xsl:variable name="sect_details" select="./refsect1[@id='details']"/>
447 <xsl:variable name="sect_property_details" select="./refsect1[@id='property_details']"/>
448 <xsl:variable name="sect_child_property_details" select="./refsect1[@id='child_property_details']"/>
449 <xsl:variable name="sect_style_property_details" select="./refsect1[@id='style_property_details']"/>
450 <xsl:variable name="sect_signals" select="./refsect1[@id='signals']"/>
453 <xsl:if test=
"$suppress.navigation = '0' and $home != .">
454 <table class=
"navigation" id=
"top" width=
"100%"
455 summary =
"Navigation header" cellpadding=
"2" cellspacing=
"2">
458 <xsl:when test=
"count($prev) > 0">
461 <xsl:attribute name=
"href">
462 <xsl:call-template name=
"href.target">
463 <xsl:with-param name=
"object" select=
"$prev"/>
466 <img src=
"left.png" width=
"24" height=
"24" border=
"0">
467 <xsl:attribute name=
"alt">
468 <xsl:call-template name=
"gentext">
469 <xsl:with-param name=
"key">nav-prev
</xsl:with-param>
481 <xsl:when test=
"count($up) > 0 and $up != $home">
484 <xsl:attribute name=
"href">
485 <xsl:call-template name=
"href.target">
486 <xsl:with-param name=
"object" select=
"$up"/>
489 <img src=
"up.png" width=
"24" height=
"24" border=
"0">
490 <xsl:attribute name=
"alt">
491 <xsl:call-template name=
"gentext">
492 <xsl:with-param name=
"key">nav-up
</xsl:with-param>
504 <xsl:when test=
"$home != .">
507 <xsl:attribute name=
"href">
508 <xsl:call-template name=
"href.target">
509 <xsl:with-param name=
"object" select=
"$home"/>
512 <img src=
"home.png" width=
"24" height=
"24" border=
"0">
513 <xsl:attribute name=
"alt">
514 <xsl:call-template name=
"gentext">
515 <xsl:with-param name=
"key">nav-home
</xsl:with-param>
526 <th width=
"100%" align=
"center">
527 <xsl:apply-templates select=
"$home" mode=
"object.title.markup"/>
530 <xsl:when test=
"count($next) > 0">
533 <xsl:attribute name=
"href">
534 <xsl:call-template name=
"href.target">
535 <xsl:with-param name=
"object" select=
"$next"/>
538 <img src=
"right.png" width=
"24" height=
"24" border=
"0">
539 <xsl:attribute name=
"alt">
540 <xsl:call-template name=
"gentext">
541 <xsl:with-param name=
"key">nav-next
</xsl:with-param>
553 <!--<xsl:if test="name()='refentry'"-->
555 <xsl:when test=
"count($refsections) > 0">
557 <td colspan=
"5" class=
"shortcuts">
558 <xsl:if test=
"count($sect_synopsis) > 0">
559 <a href=
"#{$section_id}.synopsis" class=
"shortcut">Top
</a>
561 <xsl:if test=
"count($sect_desc) > 0">
563 <a href=
"#{$section_id}.description" class=
"shortcut">
564 <xsl:value-of select=
"./refsect1[@role='desc']/title"/>
567 <xsl:if test=
"count($sect_object_hierarchy) > 0">
569 <a href=
"#{$section_id}.object-hierarchy" class=
"shortcut">
570 <xsl:value-of select=
"./refsect1[@role='object_hierarchy']/title"/>
573 <xsl:if test=
"count($sect_impl_interfaces) > 0">
575 <a href=
"#{$section_id}.implemented-interfaces" class=
"shortcut">
576 <xsl:value-of select=
"./refsect1[@role='impl_interfaces']/title"/>
579 <xsl:if test=
"count($sect_prerequisites) > 0">
581 <a href=
"#{$section_id}.prerequisites" class=
"shortcut">
582 <xsl:value-of select=
"./refsect1[@role='prerequisites']/title"/>
585 <xsl:if test=
"count($sect_derived_interfaces) > 0">
587 <a href=
"#{$section_id}.derived-interfaces" class=
"shortcut">
588 <xsl:value-of select=
"./refsect1[@role='derived_interfaces']/title"/>
591 <xsl:if test=
"count($sect_implementations) > 0">
593 <a href=
"#{$section_id}.implementations" class=
"shortcut">
594 <xsl:value-of select=
"./refsect1[@role='implementations']/title"/>
597 <xsl:if test=
"count($sect_properties) > 0">
599 <a href=
"#{$section_id}.properties" class=
"shortcut">
600 <xsl:value-of select=
"./refsect1[@role='properties']/title"/>
603 <xsl:if test=
"count($sect_child_properties) > 0">
605 <a href=
"#{$section_id}.child-properties" class=
"shortcut">
606 <xsl:value-of select=
"./refsect1[@role='child_properties']/title"/>
609 <xsl:if test=
"count($sect_style_properties) > 0">
611 <a href=
"#{$section_id}.style-properties" class=
"shortcut">
612 <xsl:value-of select=
"./refsect1[@role='style_properties']/title"/>
615 <xsl:if test=
"count($sect_signal_proto) > 0">
617 <a href=
"#{$section_id}.signals" class=
"shortcut">
618 <xsl:value-of select=
"./refsect1[@role='signal_proto']/title"/>
622 <xsl:if test="count($sect_details) > 0">
623 <a href="#details" class="shortcut">
624 <xsl:value-of select="./refsect1[@id='details']/title"/>
628 <xsl:if test="count($sect_property_details) > 0">
629 <a href="#property_details" class="shortcut">
630 <xsl:value-of select="./refsect1[@id='property_details']/title"/>
634 <xsl:if test="count($sect_child_property_details) > 0">
635 <a href="#child_property_details" class="shortcut">
636 <xsl:value-of select="./refsect1[@id='property_child_details']/title"/>
640 <xsl:if test="count($sect_style_property_details) > 0">
641 <a href="#style_property_details" class="shortcut">
642 <xsl:value-of select="./refsect1[@id='style_property_details']/title"/>
646 <xsl:if test="count($sect_signals) > 0">
647 <a href="#signals" class="shortcut">
648 <xsl:value-of select="./refsect1[@id='signals']/title"/>
656 <!-- this is not yet very nice, as it requires all glossdic/indexdiv
657 elements having a anchor element. maybe we can customize the xsl
658 to automaticaly create local anchors
660 <xsl:when test=
"count($glssections) > 0">
662 <td colspan=
"5" class=
"shortcuts">
663 <xsl:for-each select=
"./glossdiv">
664 <xsl:if test=
"position() > 1">
668 <xsl:attribute name=
"href">#gls
<xsl:value-of select=
"./title"/></xsl:attribute>
669 <xsl:value-of select=
"./title"/>
675 <xsl:when test=
"count($idxsections) > 0">
677 <td colspan=
"5" class=
"shortcuts">
678 <xsl:for-each select=
"./indexdiv/indexdiv">
679 <xsl:if test=
"position() > 1">
683 <xsl:attribute name=
"href">#idx
<xsl:value-of select=
"./title"/></xsl:attribute>
684 <xsl:value-of select=
"./title"/>
695 <xsl:template name=
"footer.navigation">
698 <!-- avoid creating multiple identical indices
699 if the stylesheets don't support filtered indices
701 <xsl:template match=
"index">
702 <xsl:variable name=
"has-filtered-index">
703 <xsl:call-template name=
"version-greater-or-equal">
704 <xsl:with-param name=
"ver1" select=
"$VERSION" />
705 <xsl:with-param name=
"ver2">1.66</xsl:with-param>
708 <xsl:if test=
"($has-filtered-index = 1) or (count(@role) = 0)">
713 <xsl:template match=
"index" mode=
"toc">
714 <xsl:variable name=
"has-filtered-index">
715 <xsl:call-template name=
"version-greater-or-equal">
716 <xsl:with-param name=
"ver1" select=
"$VERSION" />
717 <xsl:with-param name=
"ver2">1.66</xsl:with-param>
720 <xsl:if test=
"($has-filtered-index = 1) or (count(@role) = 0)">
725 <xsl:template match=
"para">
727 <xsl:when test=
"@role = 'gallery'">
728 <div class=
"container">
729 <div class=
"gallery-spacer"> </div>
730 <xsl:apply-templates mode=
"gallery.mode"/>
731 <div class=
"gallery-spacer"> </div>
739 <!-- FIXME: try if that works too -->
740 <!--xsl:template match="para[@role='gallery']">
741 <div class="container">
742 <div class="gallery-spacer"> </div>
743 <xsl:apply-templates mode="gallery.mode"/>
744 <div class="gallery-spacer"> </div>
750 <xsl:template match="link" mode="gallery.mode">
751 <div class="gallery-float">
752 <xsl:apply-templates select="."/>
756 <!-- add gallery handling to refnamediv template -->
757 <xsl:template match=
"refnamediv">
758 <div class=
"{name(.)}">
760 <tr><td valign=
"top">
761 <xsl:call-template name=
"anchor"/>
763 <xsl:when test=
"$refentry.generate.name != 0">
765 <xsl:call-template name=
"gentext">
766 <xsl:with-param name=
"key" select=
"'RefName'"/>
770 <xsl:when test=
"$refentry.generate.title != 0">
773 <xsl:when test=
"../refmeta/refentrytitle">
774 <xsl:apply-templates select=
"../refmeta/refentrytitle"/>
777 <xsl:apply-templates select=
"refname[1]"/>
784 <xsl:apply-templates/>
787 <td valign=
"top" align=
"right">
789 <xsl:when test=
"../refmeta/refmiscinfo/inlinegraphic">
790 <xsl:apply-templates select=
"../refmeta/refmiscinfo/inlinegraphic"/>
793 <!-- find the gallery image to use here
794 - determine the id of the enclosing refentry
795 - look for an inlinegraphic inside a link with linkend == refentryid inside a para with role == gallery
798 <xsl:variable name=
"refentryid" select=
"../@id"/>
799 <xsl:apply-templates select=
"key('gallery.key', $refentryid)/inlinegraphic"/>
807 <!-- add anchors for index sections -->
808 <xsl:template match=
"indexdiv">
809 <a><xsl:attribute name=
"name">idx
<xsl:value-of select=
"./title"/></xsl:attribute></a>
810 <xsl:apply-templates/>
813 <!-- add anchors for glossary sections -->
814 <xsl:template match=
"glossdiv">
815 <a><xsl:attribute name=
"name">gls
<xsl:value-of select=
"./title"/></xsl:attribute></a>
816 <xsl:apply-templates/>
819 <!-- Exterminate any trace of indexterms in the main flow -->
820 <xsl:template match=
"indexterm">
823 <!-- Extra link on the right side of doc-blobs -->
824 <xsl:template name=
"user.format.extralinks">
825 <xsl:if test=
"../ulink[@role='extralinks']">
826 <span class=
"extralinks">
827 <xsl:for-each select=
"../ulink[@role='extralinks']">
828 <xsl:if test=
"position() = 1">[
 </xsl:if>
829 <xsl:if test=
"position() > 1"> |
 </xsl:if>
831 <xsl:attribute name=
"href"><xsl:value-of select=
"@url"/></xsl:attribute>
832 <xsl:copy-of select=
"text()" />
834 <xsl:if test=
"position() = last()"> ]
</xsl:if>
838 <!--xsl:copy-of select="text()" /-->
839 <xsl:apply-templates/>
842 <!-- this is not in use yet (see gtkdoc-mkdb
843 <xsl:template match="//refsect2/ulink[@role='extralinks']"/>
844 <xsl:template match="//refsect1/ulink[@role='extralinks']"/>
846 <xsl:template match="//refsect2/title">
847 <h3><xsl:call-template name="user.format.extralinks"/></h3>
850 <xsl:template match="//refsect1/title">
851 <h2><xsl:call-template name="user.format.extralinks"/></h2>
855 <!-- ==================================================================== -->
857 <xsl:template match=
"acronym">
858 <xsl:call-template name=
"generate.acronym.link"/>
861 <xsl:template name=
"generate.acronym.link">
862 <xsl:param name=
"acronym">
863 <xsl:apply-templates/>
866 We use for-each to change context to the database document because key()
867 only locates elements in the same document as the context node!
870 <xsl:param name=
"value" >
871 <xsl:value-of select=
"key('acronym.key', $acronym)/../glossdef/para[1]" />
874 <xsl:when test=
"$value=''">
877 In gtk-doc.xsl: For acronym (
<xsl:value-of select=
"$acronym"/>) no value found!
880 <xsl:attribute name=
"href">
881 <xsl:text>http://foldoc.org/
</xsl:text>
882 <xsl:value-of select=
"$acronym"/>
884 <xsl:call-template name=
"inline.charseq"/>
890 <xsl:attribute name=
"title">
891 <xsl:value-of select=
"$value"/>
893 <xsl:call-template name=
"inline.charseq"/>