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=
"devhelp.xsl"/>
12 <xsl:include href=
"devhelp2.xsl"/>
13 <xsl:include href=
"version-greater-or-equal.xsl"/>
15 <!-- change some parameters -->
16 <!-- http://docbook.sourceforge.net/release/xsl/current/doc/html/index.html -->
17 <xsl:param name=
"toc.section.depth">2</xsl:param>
18 <xsl:param name=
"generate.toc">
27 <xsl:param name=
"chunker.output.encoding" select=
"'UTF-8'"/>
28 <xsl:param name=
"chunker.output.indent" select=
"'yes'"/>
29 <xsl:param name=
"chunker.output.doctype-public" select=
"'-//W3C//DTD HTML 4.01 Transitional//EN'"/>
30 <xsl:param name=
"chunk.fast" select=
"1"/>
32 <xsl:param name=
"default.encoding" select=
"'UTF-8'"/>
33 <xsl:param name=
"chapter.autolabel" select=
"0"/>
34 <xsl:param name=
"use.id.as.filename" select=
"1"/>
35 <xsl:param name=
"html.ext" select=
"'.html'"/>
36 <xsl:param name=
"refentry.generate.name" select=
"0"/>
37 <xsl:param name=
"refentry.generate.title" select=
"1"/>
38 <!-- don't generate all those link tags (very slow and hardly used)
39 it does not show much effect as we have a user.head.content template
40 <xsl:param name="html.extra.head.links" select="0" />
43 <!-- use index filtering (if available) -->
44 <xsl:param name=
"index.on.role" select=
"1"/>
46 <!-- display variablelists as tables -->
47 <xsl:param name=
"variablelist.as.table" select=
"1"/>
49 <!-- new things to consider
50 <xsl:param name="glossterm.auto.link" select="0"></xsl:param>
53 <!-- this gets set on the command line ... -->
54 <xsl:param name=
"gtkdoc.version" select=
"''"/>
55 <xsl:param name=
"gtkdoc.bookname" select=
"''"/>
57 <!-- ========================================================= -->
59 <!-- l10n is slow, we don't ue it, so we'd like to turn it off
60 this atleast avoid the re-evaluation -->
61 <xsl:template name=
"l10n.language">en
</xsl:template>
63 <xsl:param name=
"gtkdoc.l10n.xml" select=
"document('http://docbook.sourceforge.net/release/xsl/current/common/en.xml')"/>
65 <xsl:template name=
"gentext">
66 <xsl:param name=
"key" select=
"local-name(.)"/>
68 <xsl:variable name=
"l10n.gentext"
69 select=
"($gtkdoc.l10n.xml/l:l10n/l:gentext[@key=$key])[1]"/>
72 <xsl:when test=
"$l10n.gentext">
73 <xsl:value-of select=
"$l10n.gentext/@text"/>
77 <xsl:text>No
"en" localization of
"</xsl:text>
78 <xsl:value-of select="$key
"/>
79 <xsl:text>" exists.
</xsl:text>
85 <xsl:template name=
"gentext.dingbat">
86 <xsl:param name=
"dingbat">bullet
</xsl:param>
88 <xsl:variable name=
"l10n.dingbat"
89 select=
"($gtkdoc.l10n.xml/l:l10n/l:dingbat[@key=$dingbat])[1]"/>
92 <xsl:when test=
"$l10n.dingbat">
93 <xsl:value-of select=
"$l10n.dingbat/@text"/>
97 <xsl:text>No
"en" localization of dingbat
</xsl:text>
98 <xsl:value-of select=
"$dingbat"/>
99 <xsl:text> exists; using
"en".
</xsl:text>
105 <xsl:template name=
"gentext.template">
106 <xsl:param name=
"context" select=
"'default'"/>
107 <xsl:param name=
"name" select=
"'default'"/>
108 <xsl:param name=
"origname" select=
"$name"/>
110 <!-- cut leading / if any to avoid one recursion -->
111 <xsl:variable name=
"rname">
113 <xsl:when test=
"starts-with($name, '/')">
114 <xsl:value-of select=
"substring-after($name, '/')"/>
117 <xsl:value-of select=
"$name"/>
122 <!-- this is called with context="title|title-numbered|title-unnumbered>
124 <xsl:text>context:</xsl:text><xsl:value-of select="$context"/>
125 <xsl:text>;name:</xsl:text><xsl:value-of select="$rname"/>
126 <xsl:text>;origname:</xsl:text><xsl:value-of select="$origname"/>
129 see html/html.xsl:<xsl:template match="*" mode="html.title.attribute">
132 <xsl:variable name=
"context.node"
133 select=
"$gtkdoc.l10n.xml/l:l10n/l:context[@name=$context]"/>
135 <xsl:variable name=
"template.node"
136 select=
"($context.node/l:template[@name=$rname])[1]"/>
139 <xsl:when test=
"$template.node/@text">
140 <xsl:value-of select=
"$template.node/@text"/>
143 <xsl:text>=</xsl:text><xsl:value-of select="$template.node/@text"/>
149 <xsl:when test=
"contains($rname, '/')">
150 <xsl:call-template name=
"gentext.template">
151 <xsl:with-param name=
"context" select=
"$context"/>
152 <xsl:with-param name=
"name" select=
"substring-after($rname, '/')"/>
153 <xsl:with-param name=
"origname" select=
"$origname"/>
161 <!-- silently test whether a gentext template exists -->
162 <xsl:template name=
"gentext.template.exists">
163 <xsl:param name=
"context" select=
"'default'"/>
164 <xsl:param name=
"name" select=
"'default'"/>
165 <xsl:param name=
"origname" select=
"$name"/>
167 <xsl:variable name=
"template">
168 <xsl:call-template name=
"gentext.template">
169 <xsl:with-param name=
"context" select=
"$context"/>
170 <xsl:with-param name=
"name" select=
"$name"/>
171 <xsl:with-param name=
"origname" select=
"$origname"/>
176 <xsl:when test=
"string-length($template) != 0">1</xsl:when>
177 <xsl:otherwise>0</xsl:otherwise>
181 <!-- shortcut version -->
182 <!-- @bug: https://bugzilla.gnome.org/show_bug.cgi?id=617478 -->
183 <xsl:template name=
"generate.html.title"/>
184 <!--xsl:template name="generate.html.title">
185 <xsl:variable name="has.title.markup">
186 <xsl:apply-templates select="." mode="title.markup">
187 <xsl:with-param name="verbose" select="0"/>
188 </xsl:apply-templates>
190 <xsl:if test="$has.title.markup != '???TITLE???'">
191 <xsl:variable name="gentext.title">
192 <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
195 <xsl:when test="string-length($gentext.title) != 0">
196 <xsl:attribute name="title">
197 <xsl:value-of select="$gentext.title"/>
200 <xsl:when test="alt">
201 <xsl:attribute name="title">
202 <xsl:value-of select="normalize-space(alt)"/>
209 <!-- Generate a title attribute for the context node (e.g. links) -->
210 <xsl:template match=
"*" mode=
"html.title.attribute">
211 <xsl:variable name=
"has.title.markup">
212 <xsl:apply-templates select=
"." mode=
"title.markup">
213 <xsl:with-param name=
"verbose" select=
"0"/>
214 </xsl:apply-templates>
216 <xsl:if test=
"$has.title.markup != '???TITLE???'">
217 <xsl:variable name=
"is.title">
218 <xsl:call-template name=
"gentext.template.exists">
219 <xsl:with-param name=
"context" select=
"'title'"/>
220 <xsl:with-param name=
"name" select=
"local-name(.)"/>
221 <xsl:with-param name=
"lang">
222 <xsl:call-template name=
"l10n.language"/>
227 <xsl:variable name=
"is.title-numbered">
228 <xsl:if test=
"$is.title = 0">
229 <xsl:call-template name=
"gentext.template.exists">
230 <xsl:with-param name=
"context" select=
"'title-numbered'"/>
231 <xsl:with-param name=
"name" select=
"local-name(.)"/>
232 <xsl:with-param name=
"lang">
233 <xsl:call-template name=
"l10n.language"/>
240 <xsl:variable name=
"is.title-unnumbered">
241 <xsl:if test=
"$is.title = 0 and $is.title-numbered = 0">
242 <xsl:call-template name=
"gentext.template.exists">
243 <xsl:with-param name=
"context" select=
"'title-unnumbered'"/>
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=
"gentext.title">
253 <xsl:if test=
"$is.title != 0 or
254 $is.title-numbered != 0 or
255 $is.title-unnumbered != 0">
256 <xsl:apply-templates select=
"."
257 mode=
"object.title.markup.textonly"/>
262 <xsl:when test=
"string-length($gentext.title) != 0">
263 <xsl:attribute name=
"title">
264 <xsl:value-of select=
"$gentext.title"/>
267 <xsl:when test=
"alt">
268 <xsl:attribute name=
"title">
269 <xsl:value-of select=
"normalize-space(alt)"/>
279 <!-- ========================================================= -->
280 <!-- template to create the index.sgml anchor index -->
282 <xsl:param name=
"gtkdoc.refsect2" select=
"//refsect2" />
284 <xsl:template match=
"book|article">
285 <xsl:variable name=
"tooldver">
286 <xsl:call-template name=
"version-greater-or-equal">
287 <xsl:with-param name=
"ver1" select=
"$VERSION" />
288 <xsl:with-param name=
"ver2">1.36</xsl:with-param>
291 <xsl:if test=
"$tooldver = 0">
292 <xsl:message terminate=
"yes">
293 FATAL-ERROR: You need the DocBook XSL Stylesheets version
1.36 or higher
294 to build the documentation.
295 Get a newer version at http://docbook.sourceforge.net/projects/xsl/
300 <!-- generate the index.sgml href index -->
301 <xsl:call-template name=
"generate.index"/>
302 <!-- generate $book.devhelp{2} -->
303 <xsl:call-template name=
"generate.devhelp"/>
304 <xsl:call-template name=
"generate.devhelp2"/>
307 <xsl:template name=
"generate.index">
308 <xsl:call-template name=
"write.text.chunk">
309 <xsl:with-param name=
"filename" select=
"'index.sgml'"/>
310 <xsl:with-param name=
"content">
311 <xsl:apply-templates select=
"/book/bookinfo/releaseinfo/ulink"
312 mode=
"generate.index.mode"/>
313 <!-- check all anchor and refentry elements -->
314 <xsl:apply-templates select=
"//anchor|//refentry|//refsect1|$gtkdoc.refsect2|//refsynopsisdiv|//varlistentry"
315 mode=
"generate.index.mode"/>
317 <xsl:with-param name=
"default.encoding" select=
"'UTF-8'"/>
318 <xsl:with-param name=
"chunker.output.indent" select=
"'no'"/>
322 <xsl:template match=
"*" mode=
"generate.index.mode">
323 <xsl:if test=
"not(@href) and count(@id) > 0">
324 <xsl:text><ANCHOR id=
"</xsl:text>
325 <xsl:value-of select=
"@id"/>
326 <xsl:text>" href=
"</xsl:text>
327 <xsl:if test=
"$gtkdoc.bookname">
328 <xsl:value-of select=
"$gtkdoc.bookname"/>
329 <xsl:text>/
</xsl:text>
331 <xsl:call-template name=
"href.target"/>
332 <xsl:text>"> </xsl:text>
336 <xsl:template match=
"/book/bookinfo/releaseinfo/ulink" mode=
"generate.index.mode">
337 <xsl:if test=
"@role='online-location'">
338 <xsl:text><ONLINE href=
"</xsl:text>
339 <xsl:value-of select=
"@url"/>
340 <xsl:text>"> </xsl:text>
344 <!-- ========================================================= -->
345 <!-- template to output gtkdoclink elements for the unknown targets -->
347 <xsl:template match=
"link">
349 <xsl:when test=
"id(@linkend)">
353 <GTKDOCLINK HREF=
"{@linkend}">
354 <xsl:apply-templates/>
360 <!-- ========================================================= -->
361 <!-- Below are the visual portions of the stylesheet. They provide
362 the normal gtk-doc output style. -->
364 <xsl:param name=
"shade.verbatim" select=
"0"/>
365 <xsl:param name=
"refentry.separator" select=
"0"/>
367 <xsl:template match=
"refsect2">
368 <xsl:if test=
"preceding-sibling::refsect2">
374 <xsl:template name=
"user.head.content">
375 <xsl:if test=
"$gtkdoc.version">
376 <meta name=
"generator" content=
"GTK-Doc V{$gtkdoc.version} (XML mode)"/>
378 <link rel=
"stylesheet" href=
"style.css" type=
"text/css"/>
381 <xsl:template name=
"user.footer.content">
385 <xsl:when test=
"$gtkdoc.version">
386 Generated by GTK-Doc V
<xsl:copy-of select=
"$gtkdoc.version" />
395 <xsl:template match=
"title" mode=
"book.titlepage.recto.mode">
396 <table class=
"navigation" id=
"top" width=
"100%"
397 cellpadding=
"2" cellspacing=
"0">
400 <p class=
"{name(.)}">
401 <xsl:value-of select=
"."/>
408 <xsl:template name=
"header.navigation">
409 <xsl:param name=
"prev" select=
"/foo"/>
410 <xsl:param name=
"next" select=
"/foo"/>
411 <xsl:variable name=
"home" select=
"/*[1]"/>
412 <xsl:variable name=
"up" select=
"parent::*"/>
413 <xsl:variable name=
"refsections" select=
"./refsect1[@role]"/>
414 <xsl:variable name=
"glssections" select=
"./glossdiv/title"/>
415 <xsl:variable name=
"idxsections" select=
"./indexdiv/indexdiv/title"/>
416 <xsl:variable name=
"section_id" select=
"./@id"/>
417 <xsl:variable name=
"sect_object_hierarchy" select=
"./refsect1[@role='object_hierarchy']"/>
418 <xsl:variable name=
"sect_impl_interfaces" select=
"./refsect1[@role='impl_interfaces']"/>
419 <xsl:variable name=
"sect_prerequisites" select=
"./refsect1[@role='prerequisites']"/>
420 <xsl:variable name=
"sect_derived_interfaces" select=
"./refsect1[@role='derived_interfaces']"/>
421 <xsl:variable name=
"sect_implementations" select=
"./refsect1[@role='implementations']"/>
422 <xsl:variable name=
"sect_properties" select=
"./refsect1[@role='properties']"/>
423 <xsl:variable name=
"sect_child_properties" select=
"./refsect1[@role='child_properties']"/>
424 <xsl:variable name=
"sect_style_properties" select=
"./refsect1[@role='style_properties']"/>
425 <xsl:variable name=
"sect_signal_proto" select=
"./refsect1[@role='signal_proto']"/>
426 <xsl:variable name=
"sect_desc" select=
"./refsect1[@role='desc']"/>
427 <xsl:variable name=
"sect_synopsis" select=
"./refsynopsisdiv[@role='synopsis']"/>
429 <xsl:variable name="sect_details" select="./refsect1[@id='details']"/>
430 <xsl:variable name="sect_property_details" select="./refsect1[@id='property_details']"/>
431 <xsl:variable name="sect_child_property_details" select="./refsect1[@id='child_property_details']"/>
432 <xsl:variable name="sect_style_property_details" select="./refsect1[@id='style_property_details']"/>
433 <xsl:variable name="sect_signals" select="./refsect1[@id='signals']"/>
436 <xsl:if test=
"$suppress.navigation = '0' and $home != .">
437 <table class=
"navigation" id=
"top" width=
"100%"
438 summary =
"Navigation header" cellpadding=
"2" cellspacing=
"2">
441 <xsl:when test=
"count($prev) > 0">
444 <xsl:attribute name=
"href">
445 <xsl:call-template name=
"href.target">
446 <xsl:with-param name=
"object" select=
"$prev"/>
449 <img src=
"left.png" width=
"24" height=
"24" border=
"0">
450 <xsl:attribute name=
"alt">
451 <xsl:call-template name=
"gentext">
452 <xsl:with-param name=
"key">nav-prev
</xsl:with-param>
464 <xsl:when test=
"count($up) > 0 and $up != $home">
467 <xsl:attribute name=
"href">
468 <xsl:call-template name=
"href.target">
469 <xsl:with-param name=
"object" select=
"$up"/>
472 <img src=
"up.png" width=
"24" height=
"24" border=
"0">
473 <xsl:attribute name=
"alt">
474 <xsl:call-template name=
"gentext">
475 <xsl:with-param name=
"key">nav-up
</xsl:with-param>
487 <xsl:when test=
"$home != .">
490 <xsl:attribute name=
"href">
491 <xsl:call-template name=
"href.target">
492 <xsl:with-param name=
"object" select=
"$home"/>
495 <img src=
"home.png" width=
"24" height=
"24" border=
"0">
496 <xsl:attribute name=
"alt">
497 <xsl:call-template name=
"gentext">
498 <xsl:with-param name=
"key">nav-home
</xsl:with-param>
509 <th width=
"100%" align=
"center">
510 <xsl:apply-templates select=
"$home" mode=
"object.title.markup"/>
513 <xsl:when test=
"count($next) > 0">
516 <xsl:attribute name=
"href">
517 <xsl:call-template name=
"href.target">
518 <xsl:with-param name=
"object" select=
"$next"/>
521 <img src=
"right.png" width=
"24" height=
"24" border=
"0">
522 <xsl:attribute name=
"alt">
523 <xsl:call-template name=
"gentext">
524 <xsl:with-param name=
"key">nav-next
</xsl:with-param>
536 <!--<xsl:if test="name()='refentry'"-->
538 <xsl:when test=
"count($refsections) > 0">
540 <td colspan=
"5" class=
"shortcuts">
541 <xsl:if test=
"count($sect_synopsis) > 0">
542 <a href=
"#{$section_id}.synopsis" class=
"shortcut">Top
</a>
544 <xsl:if test=
"count($sect_desc) > 0">
546 <a href=
"#{$section_id}.description" class=
"shortcut">
547 <xsl:value-of select=
"./refsect1[@role='desc']/title"/>
550 <xsl:if test=
"count($sect_object_hierarchy) > 0">
552 <a href=
"#{$section_id}.object-hierarchy" class=
"shortcut">
553 <xsl:value-of select=
"./refsect1[@role='object_hierarchy']/title"/>
556 <xsl:if test=
"count($sect_impl_interfaces) > 0">
558 <a href=
"#{$section_id}.implemented-interfaces" class=
"shortcut">
559 <xsl:value-of select=
"./refsect1[@role='impl_interfaces']/title"/>
562 <xsl:if test=
"count($sect_prerequisites) > 0">
564 <a href=
"#{$section_id}.prerequisites" class=
"shortcut">
565 <xsl:value-of select=
"./refsect1[@role='prerequisites']/title"/>
568 <xsl:if test=
"count($sect_derived_interfaces) > 0">
570 <a href=
"#{$section_id}.derived-interfaces" class=
"shortcut">
571 <xsl:value-of select=
"./refsect1[@role='derived_interfaces']/title"/>
574 <xsl:if test=
"count($sect_implementations) > 0">
576 <a href=
"#{$section_id}.implementations" class=
"shortcut">
577 <xsl:value-of select=
"./refsect1[@role='implementations']/title"/>
580 <xsl:if test=
"count($sect_properties) > 0">
582 <a href=
"#{$section_id}.properties" class=
"shortcut">
583 <xsl:value-of select=
"./refsect1[@role='properties']/title"/>
586 <xsl:if test=
"count($sect_child_properties) > 0">
588 <a href=
"#{$section_id}.child-properties" class=
"shortcut">
589 <xsl:value-of select=
"./refsect1[@role='child_properties']/title"/>
592 <xsl:if test=
"count($sect_style_properties) > 0">
594 <a href=
"#{$section_id}.style-properties" class=
"shortcut">
595 <xsl:value-of select=
"./refsect1[@role='style_properties']/title"/>
598 <xsl:if test=
"count($sect_signal_proto) > 0">
600 <a href=
"#{$section_id}.signals" class=
"shortcut">
601 <xsl:value-of select=
"./refsect1[@role='signal_proto']/title"/>
605 <xsl:if test="count($sect_details) > 0">
606 <a href="#details" class="shortcut">
607 <xsl:value-of select="./refsect1[@id='details']/title"/>
611 <xsl:if test="count($sect_property_details) > 0">
612 <a href="#property_details" class="shortcut">
613 <xsl:value-of select="./refsect1[@id='property_details']/title"/>
617 <xsl:if test="count($sect_child_property_details) > 0">
618 <a href="#child_property_details" class="shortcut">
619 <xsl:value-of select="./refsect1[@id='property_child_details']/title"/>
623 <xsl:if test="count($sect_style_property_details) > 0">
624 <a href="#style_property_details" class="shortcut">
625 <xsl:value-of select="./refsect1[@id='style_property_details']/title"/>
629 <xsl:if test="count($sect_signals) > 0">
630 <a href="#signals" class="shortcut">
631 <xsl:value-of select="./refsect1[@id='signals']/title"/>
639 <!-- this is not yet very nice, as it requires all glossdic/indexdiv
640 elements having a anchor element. maybe we can customize the xsl
641 to automaticaly create local anchors
643 <xsl:when test=
"count($glssections) > 0">
645 <td colspan=
"5" class=
"shortcuts">
646 <xsl:for-each select=
"./glossdiv">
647 <xsl:if test=
"position() > 1">
651 <xsl:attribute name=
"href">#gls
<xsl:value-of select=
"./title"/></xsl:attribute>
652 <xsl:value-of select=
"./title"/>
658 <xsl:when test=
"count($idxsections) > 0">
660 <td colspan=
"5" class=
"shortcuts">
661 <xsl:for-each select=
"./indexdiv/indexdiv">
662 <xsl:if test=
"position() > 1">
666 <xsl:attribute name=
"href">#idx
<xsl:value-of select=
"./title"/></xsl:attribute>
667 <xsl:value-of select=
"./title"/>
678 <xsl:template name=
"footer.navigation">
681 <!-- avoid creating multiple identical indices
682 if the stylesheets don't support filtered indices
684 <xsl:template match=
"index">
685 <xsl:variable name=
"has-filtered-index">
686 <xsl:call-template name=
"version-greater-or-equal">
687 <xsl:with-param name=
"ver1" select=
"$VERSION" />
688 <xsl:with-param name=
"ver2">1.66</xsl:with-param>
691 <xsl:if test=
"($has-filtered-index = 1) or (count(@role) = 0)">
696 <xsl:template match=
"index" mode=
"toc">
697 <xsl:variable name=
"has-filtered-index">
698 <xsl:call-template name=
"version-greater-or-equal">
699 <xsl:with-param name=
"ver1" select=
"$VERSION" />
700 <xsl:with-param name=
"ver2">1.66</xsl:with-param>
703 <xsl:if test=
"($has-filtered-index = 1) or (count(@role) = 0)">
708 <xsl:template match=
"para">
710 <xsl:when test=
"@role = 'gallery'">
711 <div class=
"container">
712 <div class=
"gallery-spacer"> </div>
713 <xsl:apply-templates mode=
"gallery.mode"/>
714 <div class=
"gallery-spacer"> </div>
722 <!-- FIXME: try if that works too -->
723 <!--xsl:template match="para[@role='gallery']">
724 <div class="container">
725 <div class="gallery-spacer"> </div>
726 <xsl:apply-templates mode="gallery.mode"/>
727 <div class="gallery-spacer"> </div>
733 <xsl:template match="link" mode="gallery.mode">
734 <div class="gallery-float">
735 <xsl:apply-templates select="."/>
739 <!-- add gallery handling to refnamediv template -->
740 <xsl:template match=
"refnamediv">
741 <div class=
"{name(.)}">
743 <tr><td valign=
"top">
744 <xsl:call-template name=
"anchor"/>
746 <xsl:when test=
"$refentry.generate.name != 0">
748 <xsl:call-template name=
"gentext">
749 <xsl:with-param name=
"key" select=
"'RefName'"/>
753 <xsl:when test=
"$refentry.generate.title != 0">
756 <xsl:when test=
"../refmeta/refentrytitle">
757 <xsl:apply-templates select=
"../refmeta/refentrytitle"/>
760 <xsl:apply-templates select=
"refname[1]"/>
767 <xsl:apply-templates/>
770 <td valign=
"top" align=
"right">
772 <xsl:when test=
"../refmeta/refmiscinfo/inlinegraphic">
773 <xsl:apply-templates select=
"../refmeta/refmiscinfo/inlinegraphic"/>
776 <!-- find the gallery image to use here
777 - determine the id of the enclosing refentry
778 - look for an inlinegraphic inside a link with linkend == refentryid inside a para with role == gallery
781 <xsl:variable name=
"refentryid" select=
"../@id"/>
782 <xsl:apply-templates select=
"//para[@role = 'gallery']/link[@linkend = $refentryid]/inlinegraphic"/>
790 <!-- add anchors for index sections -->
791 <xsl:template match=
"indexdiv">
792 <a><xsl:attribute name=
"name">idx
<xsl:value-of select=
"./title"/></xsl:attribute></a>
793 <xsl:apply-templates/>
796 <!-- add anchors for glossary sections -->
797 <xsl:template match=
"glossdiv">
798 <a><xsl:attribute name=
"name">gls
<xsl:value-of select=
"./title"/></xsl:attribute></a>
799 <xsl:apply-templates/>
802 <!-- Exterminate any trace of indexterms in the main flow -->
803 <xsl:template match=
"indexterm">
806 <!-- Extra link on the right side of doc-blobs -->
807 <xsl:template name=
"user.format.extralinks">
808 <xsl:if test=
"../ulink[@role='extralinks']">
809 <span class=
"extralinks">
810 <xsl:for-each select=
"../ulink[@role='extralinks']">
811 <xsl:if test=
"position() = 1">[
 </xsl:if>
812 <xsl:if test=
"position() > 1"> |
 </xsl:if>
814 <xsl:attribute name=
"href"><xsl:value-of select=
"@url"/></xsl:attribute>
815 <xsl:copy-of select=
"text()" />
817 <xsl:if test=
"position() = last()"> ]
</xsl:if>
821 <!--xsl:copy-of select="text()" /-->
822 <xsl:apply-templates/>
825 <!-- this is not in use yet (see gtkdoc-mkdb
826 <xsl:template match="//refsect2/ulink[@role='extralinks']"/>
827 <xsl:template match="//refsect1/ulink[@role='extralinks']"/>
829 <xsl:template match="//refsect2/title">
830 <h3><xsl:call-template name="user.format.extralinks"/></h3>
833 <xsl:template match="//refsect1/title">
834 <h2><xsl:call-template name="user.format.extralinks"/></h2>
838 <!-- ==================================================================== -->
840 <xsl:template match=
"acronym">
841 <xsl:call-template name=
"generate.acronym.link"/>
844 <xsl:template name=
"generate.acronym.link">
845 <xsl:param name=
"acronym">
846 <xsl:apply-templates/>
849 We use for-each to change context to the database document because key()
850 only locates elements in the same document as the context node!
853 <xsl:param name=
"value" >
854 <xsl:value-of select=
"//glossentry/glossterm[text()=$acronym]/../glossdef/para[1]" />
857 <xsl:when test=
"$value=''">
860 In gtk-doc.xsl: For acronym (
<xsl:value-of select=
"$acronym"/>) no value found!
863 <xsl:attribute name=
"href">
864 <xsl:text>http://foldoc.org/
</xsl:text>
865 <xsl:value-of select=
"$acronym"/>
867 <xsl:call-template name=
"inline.charseq"/>
873 <xsl:attribute name=
"title">
874 <xsl:value-of select=
"$value"/>
876 <xsl:call-template name=
"inline.charseq"/>