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 if 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 <xsl:template name=
"generate.html.title">
183 <xsl:variable name=
"has.title.markup">
184 <xsl:apply-templates select=
"." mode=
"title.markup">
185 <xsl:with-param name=
"verbose" select=
"0"/>
186 </xsl:apply-templates>
188 <xsl:if test=
"$has.title.markup != '???TITLE???'">
189 <xsl:variable name=
"gentext.title">
190 <xsl:apply-templates select=
"." mode=
"object.title.markup.textonly"/>
193 <xsl:when test=
"string-length($gentext.title) != 0">
194 <xsl:attribute name=
"title">
195 <xsl:value-of select=
"$gentext.title"/>
198 <!-- Fall back to alt if available -->
199 <xsl:when test=
"alt">
200 <xsl:attribute name=
"title">
201 <xsl:value-of select=
"normalize-space(alt)"/>
208 <!-- Generate a title attribute for the context node -->
209 <xsl:template match=
"*" mode=
"html.title.attribute">
210 <xsl:variable name=
"has.title.markup">
211 <xsl:apply-templates select=
"." mode=
"title.markup">
212 <xsl:with-param name=
"verbose" select=
"0"/>
213 </xsl:apply-templates>
215 <xsl:if test=
"$has.title.markup != '???TITLE???'">
216 <xsl:variable name=
"is.title">
217 <xsl:call-template name=
"gentext.template.exists">
218 <xsl:with-param name=
"context" select=
"'title'"/>
219 <xsl:with-param name=
"name" select=
"local-name(.)"/>
220 <xsl:with-param name=
"lang">
221 <xsl:call-template name=
"l10n.language"/>
226 <xsl:variable name=
"is.title-numbered">
227 <xsl:if test=
"$is.title = 0">
228 <xsl:call-template name=
"gentext.template.exists">
229 <xsl:with-param name=
"context" select=
"'title-numbered'"/>
230 <xsl:with-param name=
"name" select=
"local-name(.)"/>
231 <xsl:with-param name=
"lang">
232 <xsl:call-template name=
"l10n.language"/>
239 <xsl:variable name=
"is.title-unnumbered">
240 <xsl:if test=
"$is.title = 0 and $is.title-numbered = 0">
241 <xsl:call-template name=
"gentext.template.exists">
242 <xsl:with-param name=
"context" select=
"'title-unnumbered'"/>
243 <xsl:with-param name=
"name" select=
"local-name(.)"/>
244 <xsl:with-param name=
"lang">
245 <xsl:call-template name=
"l10n.language"/>
251 <xsl:variable name=
"gentext.title">
252 <xsl:if test=
"$is.title != 0 or
253 $is.title-numbered != 0 or
254 $is.title-unnumbered != 0">
255 <xsl:apply-templates select=
"."
256 mode=
"object.title.markup.textonly"/>
261 <xsl:when test=
"string-length($gentext.title) != 0">
262 <xsl:attribute name=
"title">
263 <xsl:value-of select=
"$gentext.title"/>
266 <!-- Fall back to alt if available -->
267 <xsl:when test=
"alt">
268 <xsl:attribute name=
"title">
269 <xsl:value-of select=
"normalize-space(alt)"/>
277 <!-- ========================================================= -->
278 <!-- template to create the index.sgml anchor index -->
280 <xsl:param name=
"gtkdoc.refsect2" select=
"//refsect2" />
282 <xsl:template match=
"book|article">
283 <xsl:variable name=
"tooldver">
284 <xsl:call-template name=
"version-greater-or-equal">
285 <xsl:with-param name=
"ver1" select=
"$VERSION" />
286 <xsl:with-param name=
"ver2">1.36</xsl:with-param>
289 <xsl:if test=
"$tooldver = 0">
290 <xsl:message terminate=
"yes">
291 FATAL-ERROR: You need the DocBook XSL Stylesheets version
1.36 or higher
292 to build the documentation.
293 Get a newer version at http://docbook.sourceforge.net/projects/xsl/
298 <!-- generate the index.sgml href index -->
299 <xsl:call-template name=
"generate.index"/>
300 <!-- generate $book.devhelp{2} -->
301 <xsl:call-template name=
"generate.devhelp"/>
302 <xsl:call-template name=
"generate.devhelp2"/>
305 <xsl:template name=
"generate.index">
306 <xsl:call-template name=
"write.text.chunk">
307 <xsl:with-param name=
"filename" select=
"'index.sgml'"/>
308 <xsl:with-param name=
"content">
309 <xsl:apply-templates select=
"/book/bookinforeleaseinfo/ulink"
310 mode=
"generate.index.mode"/>
311 <!-- check all anchor and refentry elements -->
312 <xsl:apply-templates select=
"//anchor|//refentry|//refsect1|$gtkdoc.refsect2|//refsynopsisdiv|//varlistentry"
313 mode=
"generate.index.mode"/>
315 <xsl:with-param name=
"default.encoding" select=
"'UTF-8'"/>
316 <xsl:with-param name=
"chunker.output.indent" select=
"'no'"/>
320 <xsl:template match=
"*" mode=
"generate.index.mode">
321 <xsl:if test=
"not(@href) and count(@id) > 0">
322 <xsl:text><ANCHOR id=
"</xsl:text>
323 <xsl:value-of select=
"@id"/>
324 <xsl:text>" href=
"</xsl:text>
325 <xsl:if test=
"$gtkdoc.bookname">
326 <xsl:value-of select=
"$gtkdoc.bookname"/>
327 <xsl:text>/
</xsl:text>
329 <xsl:call-template name=
"href.target"/>
330 <xsl:text>"> </xsl:text>
334 <xsl:template match=
"/book/bookinfo/releaseinfo/ulink" mode=
"generate.index.mode">
335 <xsl:if test=
"@role='online-location'">
336 <xsl:text><ONLINE href=
"</xsl:text>
337 <xsl:value-of select=
"@url"/>
338 <xsl:text>"> </xsl:text>
342 <!-- ========================================================= -->
343 <!-- template to output gtkdoclink elements for the unknown targets -->
345 <xsl:template match=
"link">
347 <xsl:when test=
"id(@linkend)">
351 <GTKDOCLINK HREF=
"{@linkend}">
352 <xsl:apply-templates/>
358 <!-- ========================================================= -->
359 <!-- Below are the visual portions of the stylesheet. They provide
360 the normal gtk-doc output style. -->
362 <xsl:param name=
"shade.verbatim" select=
"0"/>
363 <xsl:param name=
"refentry.separator" select=
"0"/>
365 <xsl:template match=
"refsect2">
366 <xsl:if test=
"preceding-sibling::refsect2">
372 <xsl:template name=
"user.head.content">
373 <xsl:if test=
"$gtkdoc.version">
374 <meta name=
"generator" content=
"GTK-Doc V{$gtkdoc.version} (XML mode)"/>
376 <link rel=
"stylesheet" href=
"style.css" type=
"text/css"/>
379 <xsl:template name=
"user.footer.content">
383 <xsl:when test=
"$gtkdoc.version">
384 Generated by GTK-Doc V
<xsl:copy-of select=
"$gtkdoc.version" />
393 <xsl:template match=
"title" mode=
"book.titlepage.recto.mode">
394 <table class=
"navigation" id=
"top" width=
"100%"
395 cellpadding=
"2" cellspacing=
"0">
398 <p class=
"{name(.)}">
399 <xsl:value-of select=
"."/>
406 <xsl:template name=
"header.navigation">
407 <xsl:param name=
"prev" select=
"/foo"/>
408 <xsl:param name=
"next" select=
"/foo"/>
409 <xsl:variable name=
"home" select=
"/*[1]"/>
410 <xsl:variable name=
"up" select=
"parent::*"/>
411 <xsl:variable name=
"refsections" select=
"./refsect1[@role]"/>
412 <xsl:variable name=
"glssections" select=
"./glossdiv/title"/>
413 <xsl:variable name=
"idxsections" select=
"./indexdiv/indexdiv/title"/>
414 <xsl:variable name=
"section_id" select=
"./@id"/>
415 <xsl:variable name=
"sect_object_hierarchy" select=
"./refsect1[@role='object_hierarchy']"/>
416 <xsl:variable name=
"sect_impl_interfaces" select=
"./refsect1[@role='impl_interfaces']"/>
417 <xsl:variable name=
"sect_prerequisites" select=
"./refsect1[@role='prerequisites']"/>
418 <xsl:variable name=
"sect_derived_interfaces" select=
"./refsect1[@role='derived_interfaces']"/>
419 <xsl:variable name=
"sect_implementations" select=
"./refsect1[@role='implementations']"/>
420 <xsl:variable name=
"sect_properties" select=
"./refsect1[@role='properties']"/>
421 <xsl:variable name=
"sect_child_properties" select=
"./refsect1[@role='child_properties']"/>
422 <xsl:variable name=
"sect_style_properties" select=
"./refsect1[@role='style_properties']"/>
423 <xsl:variable name=
"sect_signal_proto" select=
"./refsect1[@role='signal_proto']"/>
424 <xsl:variable name=
"sect_desc" select=
"./refsect1[@role='desc']"/>
425 <xsl:variable name=
"sect_synopsis" select=
"./refsynopsisdiv[@role='synopsis']"/>
427 <xsl:variable name="sect_details" select="./refsect1[@id='details']"/>
428 <xsl:variable name="sect_property_details" select="./refsect1[@id='property_details']"/>
429 <xsl:variable name="sect_child_property_details" select="./refsect1[@id='child_property_details']"/>
430 <xsl:variable name="sect_style_property_details" select="./refsect1[@id='style_property_details']"/>
431 <xsl:variable name="sect_signals" select="./refsect1[@id='signals']"/>
434 <xsl:if test=
"$suppress.navigation = '0' and $home != .">
435 <table class=
"navigation" id=
"top" width=
"100%"
436 summary =
"Navigation header" cellpadding=
"2" cellspacing=
"2">
439 <xsl:when test=
"count($prev) > 0">
442 <xsl:attribute name=
"href">
443 <xsl:call-template name=
"href.target">
444 <xsl:with-param name=
"object" select=
"$prev"/>
447 <img src=
"left.png" width=
"24" height=
"24" border=
"0">
448 <xsl:attribute name=
"alt">
449 <xsl:call-template name=
"gentext">
450 <xsl:with-param name=
"key">nav-prev
</xsl:with-param>
462 <xsl:when test=
"count($up) > 0 and $up != $home">
465 <xsl:attribute name=
"href">
466 <xsl:call-template name=
"href.target">
467 <xsl:with-param name=
"object" select=
"$up"/>
470 <img src=
"up.png" width=
"24" height=
"24" border=
"0">
471 <xsl:attribute name=
"alt">
472 <xsl:call-template name=
"gentext">
473 <xsl:with-param name=
"key">nav-up
</xsl:with-param>
485 <xsl:when test=
"$home != .">
488 <xsl:attribute name=
"href">
489 <xsl:call-template name=
"href.target">
490 <xsl:with-param name=
"object" select=
"$home"/>
493 <img src=
"home.png" width=
"24" height=
"24" border=
"0">
494 <xsl:attribute name=
"alt">
495 <xsl:call-template name=
"gentext">
496 <xsl:with-param name=
"key">nav-home
</xsl:with-param>
507 <th width=
"100%" align=
"center">
508 <xsl:apply-templates select=
"$home" mode=
"object.title.markup"/>
511 <xsl:when test=
"count($next) > 0">
514 <xsl:attribute name=
"href">
515 <xsl:call-template name=
"href.target">
516 <xsl:with-param name=
"object" select=
"$next"/>
519 <img src=
"right.png" width=
"24" height=
"24" border=
"0">
520 <xsl:attribute name=
"alt">
521 <xsl:call-template name=
"gentext">
522 <xsl:with-param name=
"key">nav-next
</xsl:with-param>
534 <!--<xsl:if test="name()='refentry'"-->
536 <xsl:when test=
"count($refsections) > 0">
538 <td colspan=
"5" class=
"shortcuts">
539 <xsl:if test=
"count($sect_synopsis) > 0">
540 <a href=
"#{$section_id}.synopsis" class=
"shortcut">Top
</a>
542 <xsl:if test=
"count($sect_desc) > 0">
544 <a href=
"#{$section_id}.description" class=
"shortcut">
545 <xsl:value-of select=
"./refsect1[@role='desc']/title"/>
548 <xsl:if test=
"count($sect_object_hierarchy) > 0">
550 <a href=
"#{$section_id}.object-hierarchy" class=
"shortcut">
551 <xsl:value-of select=
"./refsect1[@role='object_hierarchy']/title"/>
554 <xsl:if test=
"count($sect_impl_interfaces) > 0">
556 <a href=
"#{$section_id}.implemented-interfaces" class=
"shortcut">
557 <xsl:value-of select=
"./refsect1[@role='impl_interfaces']/title"/>
560 <xsl:if test=
"count($sect_prerequisites) > 0">
562 <a href=
"#{$section_id}.prerequisites" class=
"shortcut">
563 <xsl:value-of select=
"./refsect1[@role='prerequisites']/title"/>
566 <xsl:if test=
"count($sect_derived_interfaces) > 0">
568 <a href=
"#{$section_id}.derived-interfaces" class=
"shortcut">
569 <xsl:value-of select=
"./refsect1[@role='derived_interfaces']/title"/>
572 <xsl:if test=
"count($sect_implementations) > 0">
574 <a href=
"#{$section_id}.implementations" class=
"shortcut">
575 <xsl:value-of select=
"./refsect1[@role='implementations']/title"/>
578 <xsl:if test=
"count($sect_properties) > 0">
580 <a href=
"#{$section_id}.properties" class=
"shortcut">
581 <xsl:value-of select=
"./refsect1[@role='properties']/title"/>
584 <xsl:if test=
"count($sect_child_properties) > 0">
586 <a href=
"#{$section_id}.child-properties" class=
"shortcut">
587 <xsl:value-of select=
"./refsect1[@role='child_properties']/title"/>
590 <xsl:if test=
"count($sect_style_properties) > 0">
592 <a href=
"#{$section_id}.style-properties" class=
"shortcut">
593 <xsl:value-of select=
"./refsect1[@role='style_properties']/title"/>
596 <xsl:if test=
"count($sect_signal_proto) > 0">
598 <a href=
"#{$section_id}.signals" class=
"shortcut">
599 <xsl:value-of select=
"./refsect1[@role='signal_proto']/title"/>
603 <xsl:if test="count($sect_details) > 0">
604 <a href="#details" class="shortcut">
605 <xsl:value-of select="./refsect1[@id='details']/title"/>
609 <xsl:if test="count($sect_property_details) > 0">
610 <a href="#property_details" class="shortcut">
611 <xsl:value-of select="./refsect1[@id='property_details']/title"/>
615 <xsl:if test="count($sect_child_property_details) > 0">
616 <a href="#child_property_details" class="shortcut">
617 <xsl:value-of select="./refsect1[@id='property_child_details']/title"/>
621 <xsl:if test="count($sect_style_property_details) > 0">
622 <a href="#style_property_details" class="shortcut">
623 <xsl:value-of select="./refsect1[@id='style_property_details']/title"/>
627 <xsl:if test="count($sect_signals) > 0">
628 <a href="#signals" class="shortcut">
629 <xsl:value-of select="./refsect1[@id='signals']/title"/>
637 <!-- this is not yet very nice, as it requires all glossdic/indexdiv
638 elements having a anchor element. maybe we can customize the xsl
639 to automaticaly create local anchors
641 <xsl:when test=
"count($glssections) > 0">
643 <td colspan=
"5" class=
"shortcuts">
644 <xsl:for-each select=
"./glossdiv">
645 <xsl:if test=
"position() > 1">
649 <xsl:attribute name=
"href">#gls
<xsl:value-of select=
"./title"/></xsl:attribute>
650 <xsl:value-of select=
"./title"/>
656 <xsl:when test=
"count($idxsections) > 0">
658 <td colspan=
"5" class=
"shortcuts">
659 <xsl:for-each select=
"./indexdiv/indexdiv">
660 <xsl:if test=
"position() > 1">
664 <xsl:attribute name=
"href">#idx
<xsl:value-of select=
"./title"/></xsl:attribute>
665 <xsl:value-of select=
"./title"/>
676 <xsl:template name=
"footer.navigation">
679 <!-- avoid creating multiple identical indices
680 if the stylesheets don't support filtered indices
682 <xsl:template match=
"index">
683 <xsl:variable name=
"has-filtered-index">
684 <xsl:call-template name=
"version-greater-or-equal">
685 <xsl:with-param name=
"ver1" select=
"$VERSION" />
686 <xsl:with-param name=
"ver2">1.66</xsl:with-param>
689 <xsl:if test=
"($has-filtered-index = 1) or (count(@role) = 0)">
694 <xsl:template match=
"index" mode=
"toc">
695 <xsl:variable name=
"has-filtered-index">
696 <xsl:call-template name=
"version-greater-or-equal">
697 <xsl:with-param name=
"ver1" select=
"$VERSION" />
698 <xsl:with-param name=
"ver2">1.66</xsl:with-param>
701 <xsl:if test=
"($has-filtered-index = 1) or (count(@role) = 0)">
706 <xsl:template match=
"para">
708 <xsl:when test=
"@role = 'gallery'">
709 <div class=
"container">
710 <div class=
"gallery-spacer"> </div>
711 <xsl:apply-templates mode=
"gallery.mode"/>
712 <div class=
"gallery-spacer"> </div>
720 <!-- FIXME: try if that works too -->
721 <!--xsl:template match="para[@role='gallery']">
722 <div class="container">
723 <div class="gallery-spacer"> </div>
724 <xsl:apply-templates mode="gallery.mode"/>
725 <div class="gallery-spacer"> </div>
731 <xsl:template match="link" mode="gallery.mode">
732 <div class="gallery-float">
733 <xsl:apply-templates select="."/>
737 <!-- add gallery handling to refnamediv template -->
738 <xsl:template match=
"refnamediv">
739 <div class=
"{name(.)}">
741 <tr><td valign=
"top">
742 <xsl:call-template name=
"anchor"/>
744 <xsl:when test=
"$refentry.generate.name != 0">
746 <xsl:call-template name=
"gentext">
747 <xsl:with-param name=
"key" select=
"'RefName'"/>
751 <xsl:when test=
"$refentry.generate.title != 0">
754 <xsl:when test=
"../refmeta/refentrytitle">
755 <xsl:apply-templates select=
"../refmeta/refentrytitle"/>
758 <xsl:apply-templates select=
"refname[1]"/>
765 <xsl:apply-templates/>
768 <td valign=
"top" align=
"right">
770 <xsl:when test=
"../refmeta/refmiscinfo/inlinegraphic">
771 <xsl:apply-templates select=
"../refmeta/refmiscinfo/inlinegraphic"/>
774 <!-- find the gallery image to use here
775 - determine the id of the enclosing refentry
776 - look for an inlinegraphic inside a link with linkend == refentryid inside a para with role == gallery
779 <xsl:variable name=
"refentryid" select=
"../@id"/>
780 <xsl:apply-templates select=
"//para[@role = 'gallery']/link[@linkend = $refentryid]/inlinegraphic"/>
788 <!-- add anchors for index sections -->
789 <xsl:template match=
"indexdiv">
790 <a><xsl:attribute name=
"name">idx
<xsl:value-of select=
"./title"/></xsl:attribute></a>
791 <xsl:apply-templates/>
794 <!-- add anchors for glossary sections -->
795 <xsl:template match=
"glossdiv">
796 <a><xsl:attribute name=
"name">gls
<xsl:value-of select=
"./title"/></xsl:attribute></a>
797 <xsl:apply-templates/>
800 <!-- Exterminate any trace of indexterms in the main flow -->
801 <xsl:template match=
"indexterm">
804 <!-- Extra link on the right side of doc-blobs -->
805 <xsl:template name=
"user.format.extralinks">
806 <xsl:if test=
"../ulink[@role='extralinks']">
807 <span class=
"extralinks">
808 <xsl:for-each select=
"../ulink[@role='extralinks']">
809 <xsl:if test=
"position() = 1">[
 </xsl:if>
810 <xsl:if test=
"position() > 1"> |
 </xsl:if>
812 <xsl:attribute name=
"href"><xsl:value-of select=
"@url"/></xsl:attribute>
813 <xsl:copy-of select=
"text()" />
815 <xsl:if test=
"position() = last()"> ]
</xsl:if>
819 <!--xsl:copy-of select="text()" /-->
820 <xsl:apply-templates/>
823 <!-- this is not in use yet (see gtkdoc-mkdb
824 <xsl:template match="//refsect2/ulink[@role='extralinks']"/>
825 <xsl:template match="//refsect1/ulink[@role='extralinks']"/>
827 <xsl:template match="//refsect2/title">
828 <h3><xsl:call-template name="user.format.extralinks"/></h3>
831 <xsl:template match="//refsect1/title">
832 <h2><xsl:call-template name="user.format.extralinks"/></h2>
836 <!-- ==================================================================== -->
838 <xsl:template match=
"acronym">
839 <xsl:call-template name=
"generate.acronym.link"/>
842 <xsl:template name=
"generate.acronym.link">
843 <xsl:param name=
"acronym">
844 <xsl:apply-templates/>
847 We use for-each to change context to the database document because key()
848 only locates elements in the same document as the context node!
851 <xsl:param name=
"value" >
852 <xsl:value-of select=
"//glossentry/glossterm[text()=$acronym]/../glossdef/para[1]" />
855 <xsl:when test=
"$value=''">
858 In gtk-doc.xsl: For acronym (
<xsl:value-of select=
"$acronym"/>) no value found!
861 <xsl:attribute name=
"href">
862 <xsl:text>http://foldoc.org/
</xsl:text>
863 <xsl:value-of select=
"$acronym"/>
865 <xsl:call-template name=
"inline.charseq"/>
871 <xsl:attribute name=
"title">
872 <xsl:value-of select=
"$value"/>
874 <xsl:call-template name=
"inline.charseq"/>