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=
"generate.consistent.ids" select=
"1"/>
42 <xsl:param name=
"html.ext" select=
"'.html'"/>
43 <xsl:param name=
"refentry.generate.name" select=
"0"/>
44 <xsl:param name=
"refentry.generate.title" select=
"1"/>
45 <!-- don't generate all those link tags (very slow and hardly used)
46 it does not show much effect as we have a user.head.content template
47 <xsl:param name="html.extra.head.links" select="0" />
50 <!-- use index filtering (if available) -->
51 <xsl:param name=
"index.on.role" select=
"1"/>
53 <!-- display variablelists as tables -->
54 <xsl:param name=
"variablelist.as.table" select=
"1"/>
56 <!-- new things to consider
57 <xsl:param name="glossterm.auto.link" select="0"></xsl:param>
60 <!-- this gets set on the command line ... -->
61 <xsl:param name=
"gtkdoc.version" select=
"''"/>
62 <xsl:param name=
"gtkdoc.bookname" select=
"''"/>
64 <!-- ========================================================= -->
66 <!-- l10n is slow, we don't ue it, so we'd like to turn it off
67 this atleast avoid the re-evaluation -->
68 <xsl:template name=
"l10n.language">en
</xsl:template>
70 <xsl:param name=
"gtkdoc.l10n.xml" select=
"document('http://docbook.sourceforge.net/release/xsl/current/common/en.xml')"/>
72 <xsl:key name=
"gtkdoc.gentext.key"
73 match=
"l:gentext[@key]"
75 <xsl:key name=
"gtkdoc.context.key"
76 match=
"l:context[@name]"
79 <xsl:template name=
"gentext">
80 <xsl:param name=
"key" select=
"local-name(.)"/>
82 <xsl:for-each select=
"$gtkdoc.l10n.xml">
83 <xsl:variable name=
"l10n.gentext" select=
"key('gtkdoc.gentext.key', $key)"/>
86 <xsl:when test=
"$l10n.gentext">
87 <xsl:value-of select=
"$l10n.gentext/@text"/>
91 <xsl:text>No
"en" localization of
"</xsl:text>
92 <xsl:value-of select="$key
"/>
93 <xsl:text>" exists.
</xsl:text>
100 <xsl:template name=
"gentext.dingbat">
101 <xsl:param name=
"dingbat">bullet
</xsl:param>
103 <xsl:variable name=
"l10n.dingbat"
104 select=
"($gtkdoc.l10n.xml/l:l10n/l:dingbat[@key=$dingbat])[1]"/>
107 <xsl:when test=
"$l10n.dingbat">
108 <xsl:value-of select=
"$l10n.dingbat/@text"/>
112 <xsl:text>No
"en" localization of dingbat
</xsl:text>
113 <xsl:value-of select=
"$dingbat"/>
114 <xsl:text> exists; using
"en".
</xsl:text>
120 <xsl:template name=
"gentext.template">
121 <xsl:param name=
"context" select=
"'default'"/>
122 <xsl:param name=
"name" select=
"'default'"/>
123 <xsl:param name=
"origname" select=
"$name"/>
125 <!-- cut leading / if any to avoid one recursion -->
126 <xsl:variable name=
"rname">
128 <xsl:when test=
"starts-with($name, '/')">
129 <xsl:value-of select=
"substring-after($name, '/')"/>
132 <xsl:value-of select=
"$name"/>
137 <!-- this is called with context="title|title-numbered|title-unnumbered>
139 <xsl:text>context:</xsl:text><xsl:value-of select="$context"/>
140 <xsl:text>;name:</xsl:text><xsl:value-of select="$rname"/>
141 <xsl:text>;origname:</xsl:text><xsl:value-of select="$origname"/>
144 see html/html.xsl:<xsl:template match="*" mode="html.title.attribute">
147 <xsl:for-each select=
"$gtkdoc.l10n.xml">
148 <xsl:variable name=
"context.node" select=
"key('gtkdoc.context.key', $context)"/>
149 <xsl:variable name=
"template.node"
150 select=
"($context.node/l:template[@name=$rname])[1]"/>
153 <xsl:when test=
"$template.node/@text">
154 <xsl:value-of select=
"$template.node/@text"/>
157 <xsl:text>=</xsl:text><xsl:value-of select="$template.node/@text"/>
163 <xsl:when test=
"contains($rname, '/')">
164 <xsl:call-template name=
"gentext.template">
165 <xsl:with-param name=
"context" select=
"$context"/>
166 <xsl:with-param name=
"name" select=
"substring-after($rname, '/')"/>
167 <xsl:with-param name=
"origname" select=
"$origname"/>
176 <!-- silently test whether a gentext template exists -->
177 <xsl:template name=
"gentext.template.exists">
178 <xsl:param name=
"context" select=
"'default'"/>
179 <xsl:param name=
"name" select=
"'default'"/>
180 <xsl:param name=
"origname" select=
"$name"/>
182 <xsl:variable name=
"template">
183 <xsl:call-template name=
"gentext.template">
184 <xsl:with-param name=
"context" select=
"$context"/>
185 <xsl:with-param name=
"name" select=
"$name"/>
186 <xsl:with-param name=
"origname" select=
"$origname"/>
191 <xsl:when test=
"string-length($template) != 0">1</xsl:when>
192 <xsl:otherwise>0</xsl:otherwise>
196 <!-- shortcut version -->
197 <!-- @bug: https://bugzilla.gnome.org/show_bug.cgi?id=617478 -->
198 <xsl:template name=
"generate.html.title"/>
199 <!--xsl:template name="generate.html.title">
200 <xsl:variable name="has.title.markup">
201 <xsl:apply-templates select="." mode="title.markup">
202 <xsl:with-param name="verbose" select="0"/>
203 </xsl:apply-templates>
205 <xsl:if test="$has.title.markup != '???TITLE???'">
206 <xsl:variable name="gentext.title">
207 <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
210 <xsl:when test="string-length($gentext.title) != 0">
211 <xsl:attribute name="title">
212 <xsl:value-of select="$gentext.title"/>
215 <xsl:when test="alt">
216 <xsl:attribute name="title">
217 <xsl:value-of select="normalize-space(alt)"/>
224 <!-- Generate a title attribute for the context node (e.g. links) -->
225 <xsl:template match=
"*" mode=
"html.title.attribute">
226 <xsl:variable name=
"has.title.markup">
227 <xsl:apply-templates select=
"." mode=
"title.markup">
228 <xsl:with-param name=
"verbose" select=
"0"/>
229 </xsl:apply-templates>
231 <xsl:if test=
"$has.title.markup != '???TITLE???'">
232 <xsl:variable name=
"is.title">
233 <xsl:call-template name=
"gentext.template.exists">
234 <xsl:with-param name=
"context" select=
"'title'"/>
235 <xsl:with-param name=
"name" select=
"local-name(.)"/>
236 <xsl:with-param name=
"lang">
237 <xsl:call-template name=
"l10n.language"/>
242 <xsl:variable name=
"is.title-numbered">
243 <xsl:if test=
"$is.title = 0">
244 <xsl:call-template name=
"gentext.template.exists">
245 <xsl:with-param name=
"context" select=
"'title-numbered'"/>
246 <xsl:with-param name=
"name" select=
"local-name(.)"/>
247 <xsl:with-param name=
"lang">
248 <xsl:call-template name=
"l10n.language"/>
255 <xsl:variable name=
"is.title-unnumbered">
256 <xsl:if test=
"$is.title = 0 and $is.title-numbered = 0">
257 <xsl:call-template name=
"gentext.template.exists">
258 <xsl:with-param name=
"context" select=
"'title-unnumbered'"/>
259 <xsl:with-param name=
"name" select=
"local-name(.)"/>
260 <xsl:with-param name=
"lang">
261 <xsl:call-template name=
"l10n.language"/>
267 <xsl:variable name=
"gentext.title">
268 <xsl:if test=
"$is.title != 0 or
269 $is.title-numbered != 0 or
270 $is.title-unnumbered != 0">
271 <xsl:apply-templates select=
"."
272 mode=
"object.title.markup.textonly"/>
277 <xsl:when test=
"string-length($gentext.title) != 0">
278 <xsl:attribute name=
"title">
279 <xsl:value-of select=
"$gentext.title"/>
282 <xsl:when test=
"alt">
283 <xsl:attribute name=
"title">
284 <xsl:value-of select=
"normalize-space(alt)"/>
294 <!-- ========================================================= -->
295 <!-- template to create the index.sgml anchor index -->
297 <xsl:template match=
"book|article">
298 <xsl:variable name=
"tooldver">
299 <xsl:call-template name=
"version-greater-or-equal">
300 <xsl:with-param name=
"ver1" select=
"$VERSION" />
301 <xsl:with-param name=
"ver2">1.36</xsl:with-param>
304 <xsl:if test=
"$tooldver = 0">
305 <xsl:message terminate=
"yes">
306 FATAL-ERROR: You need the DocBook XSL Stylesheets version
1.36 or higher
307 to build the documentation.
308 Get a newer version at http://docbook.sourceforge.net/projects/xsl/
313 <!-- generate the index.sgml href index -->
314 <xsl:call-template name=
"generate.index"/>
315 <!-- generate $book.devhelp2 -->
316 <xsl:call-template name=
"generate.devhelp2"/>
319 <xsl:template name=
"generate.index">
320 <xsl:call-template name=
"write.text.chunk">
321 <xsl:with-param name=
"filename" select=
"'index.sgml'"/>
322 <xsl:with-param name=
"content">
323 <xsl:apply-templates select=
"/book/bookinfo/releaseinfo/ulink"
324 mode=
"generate.index.mode"/>
325 <!-- check all anchor and refentry elements -->
327 The obvious way to write this is //anchor|//refentry|etc...
328 The obvious way is slow because it causes multiple traversals
329 in libxslt. This take about half the time.
331 <xsl:apply-templates select=
"//*[name()='anchor' or name()='refentry' or name()='refsect1' or
332 name() = 'refsect2' or name()='refsynopsisdiv' or
333 name()='varlistentry']"
334 mode=
"generate.index.mode"/>
336 <xsl:with-param name=
"default.encoding" select=
"'UTF-8'"/>
337 <xsl:with-param name=
"chunker.output.indent" select=
"'no'"/>
341 <xsl:template match=
"*" mode=
"generate.index.mode">
342 <xsl:if test=
"not(@href) and count(@id) > 0">
343 <xsl:text><ANCHOR id=
"</xsl:text>
344 <xsl:value-of select=
"@id"/>
345 <xsl:text>" href=
"</xsl:text>
346 <xsl:if test=
"$gtkdoc.bookname">
347 <xsl:value-of select=
"$gtkdoc.bookname"/>
348 <xsl:text>/
</xsl:text>
350 <xsl:call-template name=
"href.target"/>
351 <xsl:text>"> </xsl:text>
355 <xsl:template match=
"/book/bookinfo/releaseinfo/ulink" mode=
"generate.index.mode">
356 <xsl:if test=
"@role='online-location'">
357 <xsl:text><ONLINE href=
"</xsl:text>
358 <xsl:value-of select=
"@url"/>
359 <xsl:text>"> </xsl:text>
363 <!-- ========================================================= -->
364 <!-- template to output gtkdoclink elements for the unknown targets -->
366 <xsl:template match=
"link">
368 <xsl:when test=
"id(@linkend)">
372 <GTKDOCLINK HREF=
"{@linkend}">
373 <xsl:apply-templates/>
379 <!-- ========================================================= -->
380 <!-- Below are the visual portions of the stylesheet. They provide
381 the normal gtk-doc output style. -->
383 <xsl:param name=
"shade.verbatim" select=
"0"/>
384 <xsl:param name=
"refentry.separator" select=
"0"/>
386 <xsl:template match=
"refsect2">
387 <xsl:if test=
"preceding-sibling::refsect2">
393 <xsl:template name=
"user.head.content">
394 <xsl:if test=
"$gtkdoc.version">
395 <meta name=
"generator" content=
"GTK-Doc V{$gtkdoc.version} (XML mode)"/>
397 <link rel=
"stylesheet" href=
"style.css" type=
"text/css"/>
400 <xsl:template name=
"user.footer.content">
404 <xsl:when test=
"$gtkdoc.version">
405 Generated by GTK-Doc V
<xsl:copy-of select=
"$gtkdoc.version" />
414 <xsl:template match=
"title" mode=
"book.titlepage.recto.mode">
415 <table class=
"navigation" id=
"top" width=
"100%"
416 cellpadding=
"2" cellspacing=
"0">
419 <p class=
"{name(.)}">
420 <xsl:value-of select=
"."/>
427 <xsl:template name=
"header.navigation">
428 <xsl:param name=
"prev" select=
"/foo"/>
429 <xsl:param name=
"next" select=
"/foo"/>
430 <xsl:variable name=
"home" select=
"/*[1]"/>
431 <xsl:variable name=
"up" select=
"parent::*"/>
432 <xsl:variable name=
"refsections" select=
"./refsect1[@role]"/>
433 <xsl:variable name=
"glssections" select=
"./glossdiv/title"/>
434 <xsl:variable name=
"idxsections" select=
"./indexdiv/indexdiv/title"/>
435 <xsl:variable name=
"section_id" select=
"./@id"/>
436 <xsl:variable name=
"sect_object_hierarchy" select=
"./refsect1[@role='object_hierarchy']"/>
437 <xsl:variable name=
"sect_impl_interfaces" select=
"./refsect1[@role='impl_interfaces']"/>
438 <xsl:variable name=
"sect_prerequisites" select=
"./refsect1[@role='prerequisites']"/>
439 <xsl:variable name=
"sect_derived_interfaces" select=
"./refsect1[@role='derived_interfaces']"/>
440 <xsl:variable name=
"sect_implementations" select=
"./refsect1[@role='implementations']"/>
441 <xsl:variable name=
"sect_properties" select=
"./refsect1[@role='properties']"/>
442 <xsl:variable name=
"sect_child_properties" select=
"./refsect1[@role='child_properties']"/>
443 <xsl:variable name=
"sect_style_properties" select=
"./refsect1[@role='style_properties']"/>
444 <xsl:variable name=
"sect_signal_proto" select=
"./refsect1[@role='signal_proto']"/>
445 <xsl:variable name=
"sect_desc" select=
"./refsect1[@role='desc']"/>
446 <xsl:variable name=
"sect_synopsis" select=
"./refsynopsisdiv[@role='synopsis']"/>
448 <xsl:variable name="sect_details" select="./refsect1[@id='details']"/>
449 <xsl:variable name="sect_property_details" select="./refsect1[@id='property_details']"/>
450 <xsl:variable name="sect_child_property_details" select="./refsect1[@id='child_property_details']"/>
451 <xsl:variable name="sect_style_property_details" select="./refsect1[@id='style_property_details']"/>
452 <xsl:variable name="sect_signals" select="./refsect1[@id='signals']"/>
455 <xsl:if test=
"$suppress.navigation = '0' and $home != .">
456 <table class=
"navigation" id=
"top" width=
"100%"
457 summary =
"Navigation header" cellpadding=
"2" cellspacing=
"2">
460 <xsl:when test=
"count($prev) > 0">
463 <xsl:attribute name=
"href">
464 <xsl:call-template name=
"href.target">
465 <xsl:with-param name=
"object" select=
"$prev"/>
468 <img src=
"left.png" width=
"24" height=
"24" border=
"0">
469 <xsl:attribute name=
"alt">
470 <xsl:call-template name=
"gentext">
471 <xsl:with-param name=
"key">nav-prev
</xsl:with-param>
483 <xsl:when test=
"count($up) > 0 and $up != $home">
486 <xsl:attribute name=
"href">
487 <xsl:call-template name=
"href.target">
488 <xsl:with-param name=
"object" select=
"$up"/>
491 <img src=
"up.png" width=
"24" height=
"24" border=
"0">
492 <xsl:attribute name=
"alt">
493 <xsl:call-template name=
"gentext">
494 <xsl:with-param name=
"key">nav-up
</xsl:with-param>
506 <xsl:when test=
"$home != .">
509 <xsl:attribute name=
"href">
510 <xsl:call-template name=
"href.target">
511 <xsl:with-param name=
"object" select=
"$home"/>
514 <img src=
"home.png" width=
"24" height=
"24" border=
"0">
515 <xsl:attribute name=
"alt">
516 <xsl:call-template name=
"gentext">
517 <xsl:with-param name=
"key">nav-home
</xsl:with-param>
528 <th width=
"100%" align=
"center">
529 <xsl:apply-templates select=
"$home" mode=
"object.title.markup"/>
532 <xsl:when test=
"count($next) > 0">
535 <xsl:attribute name=
"href">
536 <xsl:call-template name=
"href.target">
537 <xsl:with-param name=
"object" select=
"$next"/>
540 <img src=
"right.png" width=
"24" height=
"24" border=
"0">
541 <xsl:attribute name=
"alt">
542 <xsl:call-template name=
"gentext">
543 <xsl:with-param name=
"key">nav-next
</xsl:with-param>
555 <!--<xsl:if test="name()='refentry'"-->
557 <xsl:when test=
"count($refsections) > 0">
559 <td colspan=
"5" class=
"shortcuts">
560 <xsl:if test=
"count($sect_synopsis) > 0">
561 <a href=
"#{$section_id}.synopsis" class=
"shortcut">Top
</a>
563 <xsl:if test=
"count($sect_desc) > 0">
565 <a href=
"#{$section_id}.description" class=
"shortcut">
566 <xsl:value-of select=
"./refsect1[@role='desc']/title"/>
569 <xsl:if test=
"count($sect_object_hierarchy) > 0">
571 <a href=
"#{$section_id}.object-hierarchy" class=
"shortcut">
572 <xsl:value-of select=
"./refsect1[@role='object_hierarchy']/title"/>
575 <xsl:if test=
"count($sect_impl_interfaces) > 0">
577 <a href=
"#{$section_id}.implemented-interfaces" class=
"shortcut">
578 <xsl:value-of select=
"./refsect1[@role='impl_interfaces']/title"/>
581 <xsl:if test=
"count($sect_prerequisites) > 0">
583 <a href=
"#{$section_id}.prerequisites" class=
"shortcut">
584 <xsl:value-of select=
"./refsect1[@role='prerequisites']/title"/>
587 <xsl:if test=
"count($sect_derived_interfaces) > 0">
589 <a href=
"#{$section_id}.derived-interfaces" class=
"shortcut">
590 <xsl:value-of select=
"./refsect1[@role='derived_interfaces']/title"/>
593 <xsl:if test=
"count($sect_implementations) > 0">
595 <a href=
"#{$section_id}.implementations" class=
"shortcut">
596 <xsl:value-of select=
"./refsect1[@role='implementations']/title"/>
599 <xsl:if test=
"count($sect_properties) > 0">
601 <a href=
"#{$section_id}.properties" class=
"shortcut">
602 <xsl:value-of select=
"./refsect1[@role='properties']/title"/>
605 <xsl:if test=
"count($sect_child_properties) > 0">
607 <a href=
"#{$section_id}.child-properties" class=
"shortcut">
608 <xsl:value-of select=
"./refsect1[@role='child_properties']/title"/>
611 <xsl:if test=
"count($sect_style_properties) > 0">
613 <a href=
"#{$section_id}.style-properties" class=
"shortcut">
614 <xsl:value-of select=
"./refsect1[@role='style_properties']/title"/>
617 <xsl:if test=
"count($sect_signal_proto) > 0">
619 <a href=
"#{$section_id}.signals" class=
"shortcut">
620 <xsl:value-of select=
"./refsect1[@role='signal_proto']/title"/>
624 <xsl:if test="count($sect_details) > 0">
625 <a href="#details" class="shortcut">
626 <xsl:value-of select="./refsect1[@id='details']/title"/>
630 <xsl:if test="count($sect_property_details) > 0">
631 <a href="#property_details" class="shortcut">
632 <xsl:value-of select="./refsect1[@id='property_details']/title"/>
636 <xsl:if test="count($sect_child_property_details) > 0">
637 <a href="#child_property_details" class="shortcut">
638 <xsl:value-of select="./refsect1[@id='property_child_details']/title"/>
642 <xsl:if test="count($sect_style_property_details) > 0">
643 <a href="#style_property_details" class="shortcut">
644 <xsl:value-of select="./refsect1[@id='style_property_details']/title"/>
648 <xsl:if test="count($sect_signals) > 0">
649 <a href="#signals" class="shortcut">
650 <xsl:value-of select="./refsect1[@id='signals']/title"/>
658 <!-- this is not yet very nice, as it requires all glossdic/indexdiv
659 elements having a anchor element. maybe we can customize the xsl
660 to automaticaly create local anchors
662 <xsl:when test=
"count($glssections) > 0">
664 <td colspan=
"5" class=
"shortcuts">
665 <xsl:for-each select=
"./glossdiv">
666 <xsl:if test=
"position() > 1">
670 <xsl:attribute name=
"href">#gls
<xsl:value-of select=
"./title"/></xsl:attribute>
671 <xsl:value-of select=
"./title"/>
677 <xsl:when test=
"count($idxsections) > 0">
679 <td colspan=
"5" class=
"shortcuts">
680 <xsl:for-each select=
"./indexdiv/indexdiv">
681 <xsl:if test=
"position() > 1">
685 <xsl:attribute name=
"href">#idx
<xsl:value-of select=
"./title"/></xsl:attribute>
686 <xsl:value-of select=
"./title"/>
697 <xsl:template name=
"footer.navigation">
700 <!-- avoid creating multiple identical indices
701 if the stylesheets don't support filtered indices
703 <xsl:template match=
"index">
704 <xsl:variable name=
"has-filtered-index">
705 <xsl:call-template name=
"version-greater-or-equal">
706 <xsl:with-param name=
"ver1" select=
"$VERSION" />
707 <xsl:with-param name=
"ver2">1.66</xsl:with-param>
710 <xsl:if test=
"($has-filtered-index = 1) or (count(@role) = 0)">
715 <xsl:template match=
"index" mode=
"toc">
716 <xsl:variable name=
"has-filtered-index">
717 <xsl:call-template name=
"version-greater-or-equal">
718 <xsl:with-param name=
"ver1" select=
"$VERSION" />
719 <xsl:with-param name=
"ver2">1.66</xsl:with-param>
722 <xsl:if test=
"($has-filtered-index = 1) or (count(@role) = 0)">
727 <xsl:template match=
"para">
729 <xsl:when test=
"@role = 'gallery'">
730 <div class=
"container">
731 <div class=
"gallery-spacer"> </div>
732 <xsl:apply-templates mode=
"gallery.mode"/>
733 <div class=
"gallery-spacer"> </div>
741 <!-- FIXME: try if that works too -->
742 <!--xsl:template match="para[@role='gallery']">
743 <div class="container">
744 <div class="gallery-spacer"> </div>
745 <xsl:apply-templates mode="gallery.mode"/>
746 <div class="gallery-spacer"> </div>
752 <xsl:template match="link" mode="gallery.mode">
753 <div class="gallery-float">
754 <xsl:apply-templates select="."/>
758 <!-- add gallery handling to refnamediv template -->
759 <xsl:template match=
"refnamediv">
760 <div class=
"{name(.)}">
762 <tr><td valign=
"top">
763 <xsl:call-template name=
"anchor"/>
765 <xsl:when test=
"$refentry.generate.name != 0">
767 <xsl:call-template name=
"gentext">
768 <xsl:with-param name=
"key" select=
"'RefName'"/>
772 <xsl:when test=
"$refentry.generate.title != 0">
775 <xsl:when test=
"../refmeta/refentrytitle">
776 <xsl:apply-templates select=
"../refmeta/refentrytitle"/>
779 <xsl:apply-templates select=
"refname[1]"/>
786 <xsl:apply-templates/>
789 <td valign=
"top" align=
"right">
791 <xsl:when test=
"../refmeta/refmiscinfo/inlinegraphic">
792 <xsl:apply-templates select=
"../refmeta/refmiscinfo/inlinegraphic"/>
795 <!-- find the gallery image to use here
796 - determine the id of the enclosing refentry
797 - look for an inlinegraphic inside a link with linkend == refentryid inside a para with role == gallery
800 <xsl:variable name=
"refentryid" select=
"../@id"/>
801 <xsl:apply-templates select=
"key('gallery.key', $refentryid)/inlinegraphic"/>
809 <!-- add anchors for index sections -->
810 <xsl:template match=
"indexdiv">
811 <a><xsl:attribute name=
"name">idx
<xsl:value-of select=
"./title"/></xsl:attribute></a>
812 <xsl:apply-templates/>
815 <!-- add anchors for glossary sections -->
816 <xsl:template match=
"glossdiv">
817 <a><xsl:attribute name=
"name">gls
<xsl:value-of select=
"./title"/></xsl:attribute></a>
818 <xsl:apply-templates/>
821 <!-- Exterminate any trace of indexterms in the main flow -->
822 <xsl:template match=
"indexterm">
825 <!-- Extra link on the right side of doc-blobs -->
826 <xsl:template name=
"user.format.extralinks">
827 <xsl:if test=
"../ulink[@role='extralinks']">
828 <span class=
"extralinks">
829 <xsl:for-each select=
"../ulink[@role='extralinks']">
830 <xsl:if test=
"position() = 1">[
 </xsl:if>
831 <xsl:if test=
"position() > 1"> |
 </xsl:if>
833 <xsl:attribute name=
"href"><xsl:value-of select=
"@url"/></xsl:attribute>
834 <xsl:copy-of select=
"text()" />
836 <xsl:if test=
"position() = last()"> ]
</xsl:if>
840 <!--xsl:copy-of select="text()" /-->
841 <xsl:apply-templates/>
844 <!-- this is not in use yet (see gtkdoc-mkdb
845 <xsl:template match="//refsect2/ulink[@role='extralinks']"/>
846 <xsl:template match="//refsect1/ulink[@role='extralinks']"/>
848 <xsl:template match="//refsect2/title">
849 <h3><xsl:call-template name="user.format.extralinks"/></h3>
852 <xsl:template match="//refsect1/title">
853 <h2><xsl:call-template name="user.format.extralinks"/></h2>
857 <!-- ==================================================================== -->
859 <xsl:template match=
"acronym">
860 <xsl:call-template name=
"generate.acronym.link"/>
863 <xsl:template name=
"generate.acronym.link">
864 <xsl:param name=
"acronym">
865 <xsl:apply-templates/>
868 We use for-each to change context to the database document because key()
869 only locates elements in the same document as the context node!
872 <xsl:param name=
"value" >
873 <xsl:value-of select=
"key('acronym.key', $acronym)/../glossdef/para[1]" />
876 <xsl:when test=
"$value=''">
879 In gtk-doc.xsl: For acronym (
<xsl:value-of select=
"$acronym"/>) no value found!
882 <xsl:attribute name=
"href">
883 <xsl:text>http://foldoc.org/
</xsl:text>
884 <xsl:value-of select=
"$acronym"/>
886 <xsl:call-template name=
"inline.charseq"/>
892 <xsl:attribute name=
"title">
893 <xsl:value-of select=
"$value"/>
895 <xsl:call-template name=
"inline.charseq"/>