Added British English translation by Jen Ockwell
[gtk-doc.git] / gtk-doc.xsl
blob59890b7b802435dc57fe07334ef3331e2393c3c5
1 <?xml version='1.0'?> <!--*- mode: xml -*-->
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 version="1.0">
5 <!-- import the chunked XSL stylesheet -->
6 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
7 <xsl:include href="devhelp.xsl"/>
8 <xsl:include href="devhelp2.xsl"/>
9 <xsl:include href="version-greater-or-equal.xsl"/>
11 <!-- change some parameters -->
12 <!-- http://docbook.sourceforge.net/release/xsl/current/doc/html/index.html -->
13 <xsl:param name="toc.section.depth">2</xsl:param>
14 <xsl:param name="generate.toc">
15 book toc
16 chapter toc
17 part toc
18 reference toc
19 </xsl:param>
21 <xsl:param name="chunker.output.encoding" select="'UTF-8'"/>
22 <xsl:param name="chunker.output.indent" select="'yes'"/>
23 <xsl:param name="chunker.output.doctype-public" select="'-//W3C//DTD HTML 4.01 Transitional//EN'"/>
24 <xsl:param name="chunk.fast" select="1"/>
26 <xsl:param name="default.encoding" select="'UTF-8'"/>
27 <xsl:param name="chapter.autolabel" select="0"/>
28 <xsl:param name="use.id.as.filename" select="1"/>
29 <xsl:param name="html.ext" select="'.html'"/>
30 <xsl:param name="refentry.generate.name" select="0"/>
31 <xsl:param name="refentry.generate.title" select="1"/>
33 <!-- use index filtering (if available) -->
34 <xsl:param name="index.on.role" select="1"/>
36 <!-- display variablelists as tables -->
37 <xsl:param name="variablelist.as.table" select="1"/>
39 <!-- new things to consider
40 <xsl:param name="glossterm.auto.link" select="0"></xsl:param>
41 -->
43 <!-- this gets set on the command line ... -->
44 <xsl:param name="gtkdoc.version" select="''"/>
45 <xsl:param name="gtkdoc.bookname" select="''"/>
47 <!-- ========================================================= -->
48 <!-- template to create the index.sgml anchor index -->
50 <xsl:template match="book|article">
51 <xsl:variable name="tooldver">
52 <xsl:call-template name="version-greater-or-equal">
53 <xsl:with-param name="ver1" select="$VERSION" />
54 <xsl:with-param name="ver2">1.36</xsl:with-param>
55 </xsl:call-template>
56 </xsl:variable>
57 <xsl:if test="$tooldver = 0">
58 <xsl:message terminate="yes">
59 FATAL-ERROR: You need the DocBook XSL Stylesheets version 1.36 or higher
60 to build the documentation.
61 Get a newer version at http://docbook.sourceforge.net/projects/xsl/
62 </xsl:message>
63 </xsl:if>
64 <xsl:apply-imports/>
66 <!-- generate the index.sgml href index -->
67 <xsl:call-template name="generate.index"/>
68 <xsl:call-template name="generate.devhelp"/>
69 <xsl:call-template name="generate.devhelp2"/>
70 </xsl:template>
72 <xsl:template name="generate.index">
73 <xsl:call-template name="write.text.chunk">
74 <xsl:with-param name="filename" select="'index.sgml'"/>
75 <xsl:with-param name="content">
76 <xsl:apply-templates select="//releaseinfo/ulink"
77 mode="generate.index.mode"/>
78 <!-- check all anchor and refentry elements -->
79 <xsl:apply-templates select="//anchor|//refentry|//refsect1|//refsect2|//refsynopsisdiv"
80 mode="generate.index.mode"/>
81 </xsl:with-param>
82 <xsl:with-param name="default.encoding" select="'UTF-8'"/>
83 <xsl:with-param name="chunker.output.indent" select="'no'"/>
84 </xsl:call-template>
85 </xsl:template>
87 <xsl:template match="*" mode="generate.index.mode">
88 <xsl:if test="not(@href) and count(@id) > 0">
89 <xsl:text>&lt;ANCHOR id=&quot;</xsl:text>
90 <xsl:value-of select="@id"/>
91 <xsl:text>&quot; href=&quot;</xsl:text>
92 <xsl:if test="$gtkdoc.bookname">
93 <xsl:value-of select="$gtkdoc.bookname"/>
94 <xsl:text>/</xsl:text>
95 </xsl:if>
96 <xsl:call-template name="href.target"/>
97 <xsl:text>&quot;&gt;&#10;</xsl:text>
98 </xsl:if>
99 </xsl:template>
101 <xsl:template match="//releaseinfo/ulink" mode="generate.index.mode">
102 <xsl:if test="@role='online-location'">
103 <xsl:text>&lt;ONLINE href=&quot;</xsl:text>
104 <xsl:value-of select="@url"/>
105 <xsl:text>&quot;&gt;&#10;</xsl:text>
106 </xsl:if>
107 </xsl:template>
109 <!-- ========================================================= -->
110 <!-- template to output gtkdoclink elements for the unknown targets -->
112 <xsl:template match="link">
113 <xsl:choose>
114 <xsl:when test="id(@linkend)">
115 <xsl:apply-imports/>
116 </xsl:when>
117 <xsl:otherwise>
118 <GTKDOCLINK HREF="{@linkend}">
119 <xsl:apply-templates/>
120 </GTKDOCLINK>
121 </xsl:otherwise>
122 </xsl:choose>
123 </xsl:template>
125 <!-- ========================================================= -->
126 <!-- Below are the visual portions of the stylesheet. They provide
127 the normal gtk-doc output style. -->
129 <xsl:param name="shade.verbatim" select="0"/>
130 <xsl:param name="refentry.separator" select="0"/>
132 <xsl:template match="refsect2">
133 <xsl:if test="preceding-sibling::refsect2">
134 <hr/>
135 </xsl:if>
136 <xsl:apply-imports/>
137 </xsl:template>
139 <xsl:template name="user.head.content">
140 <xsl:if test="$gtkdoc.version">
141 <meta name="generator" content="GTK-Doc V{$gtkdoc.version} (XML mode)"/>
142 </xsl:if>
143 <link rel="stylesheet" href="style.css" type="text/css"/>
145 <!-- copied from the html.head template in the docbook stylesheets
146 we don't want links for all refentrys, thats just too much
148 <xsl:variable name="this" select="."/>
149 <xsl:for-each select="//part
150 |//reference
151 |//preface
152 |//chapter
153 |//article
154 |//appendix[not(parent::article)]|appendix
155 |//glossary[not(parent::article)]|glossary
156 |//index[not(parent::article)]|index">
157 <link rel="{local-name(.)}">
158 <xsl:attribute name="href">
159 <xsl:call-template name="href.target">
160 <xsl:with-param name="context" select="$this"/>
161 <xsl:with-param name="object" select="."/>
162 </xsl:call-template>
163 </xsl:attribute>
164 <xsl:attribute name="title">
165 <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
166 </xsl:attribute>
167 </link>
168 </xsl:for-each>
169 </xsl:template>
171 <xsl:template name="user.footer.content">
172 <div class="footer">
173 <hr />
174 <xsl:choose>
175 <xsl:when test="$gtkdoc.version">
176 Generated by GTK-Doc V<xsl:copy-of select="$gtkdoc.version" />
177 </xsl:when>
178 <xsl:otherwise>
179 Generated by GTK-Doc
180 </xsl:otherwise>
181 </xsl:choose>
182 </div>
183 </xsl:template>
185 <xsl:template match="title" mode="book.titlepage.recto.mode">
186 <table class="navigation" id="top" width="100%"
187 cellpadding="2" cellspacing="0">
188 <tr>
189 <th valign="middle">
190 <p class="{name(.)}">
191 <xsl:value-of select="."/>
192 </p>
193 </th>
194 </tr>
195 </table>
196 </xsl:template>
198 <xsl:template name="header.navigation">
199 <xsl:param name="prev" select="/foo"/>
200 <xsl:param name="next" select="/foo"/>
201 <xsl:variable name="home" select="/*[1]"/>
202 <xsl:variable name="up" select="parent::*"/>
203 <xsl:variable name="refsections" select="./refsect1[@role]"/>
204 <xsl:variable name="glssections" select="./glossdiv/title"/>
205 <xsl:variable name="idxsections" select="./indexdiv/indexdiv/title"/>
206 <xsl:variable name="section_id" select="./@id"/>
207 <xsl:variable name="sect_object_hierarchy" select="./refsect1[@role='object_hierarchy']"/>
208 <xsl:variable name="sect_impl_interfaces" select="./refsect1[@role='impl_interfaces']"/>
209 <xsl:variable name="sect_prerequisites" select="./refsect1[@role='prerequisites']"/>
210 <xsl:variable name="sect_derived_interfaces" select="./refsect1[@role='derived_interfaces']"/>
211 <xsl:variable name="sect_implementations" select="./refsect1[@role='implementations']"/>
212 <xsl:variable name="sect_properties" select="./refsect1[@role='properties']"/>
213 <xsl:variable name="sect_child_properties" select="./refsect1[@role='child_properties']"/>
214 <xsl:variable name="sect_style_properties" select="./refsect1[@role='style_properties']"/>
215 <xsl:variable name="sect_signal_proto" select="./refsect1[@role='signal_proto']"/>
216 <xsl:variable name="sect_desc" select="./refsect1[@role='desc']"/>
217 <xsl:variable name="sect_synopsis" select="./refsynopsisdiv[@role='synopsis']"/>
218 <!--
219 <xsl:variable name="sect_details" select="./refsect1[@id='details']"/>
220 <xsl:variable name="sect_property_details" select="./refsect1[@id='property_details']"/>
221 <xsl:variable name="sect_child_property_details" select="./refsect1[@id='child_property_details']"/>
222 <xsl:variable name="sect_style_property_details" select="./refsect1[@id='style_property_details']"/>
223 <xsl:variable name="sect_signals" select="./refsect1[@id='signals']"/>
226 <xsl:if test="$suppress.navigation = '0' and $home != .">
227 <table class="navigation" id="top" width="100%"
228 summary = "Navigation header" cellpadding="2" cellspacing="2">
229 <tr valign="middle">
230 <xsl:choose>
231 <xsl:when test="count($prev) > 0">
232 <td>
233 <a accesskey="p">
234 <xsl:attribute name="href">
235 <xsl:call-template name="href.target">
236 <xsl:with-param name="object" select="$prev"/>
237 </xsl:call-template>
238 </xsl:attribute>
239 <img src="left.png" width="24" height="24" border="0">
240 <xsl:attribute name="alt">
241 <xsl:call-template name="gentext">
242 <xsl:with-param name="key">nav-prev</xsl:with-param>
243 </xsl:call-template>
244 </xsl:attribute>
245 </img>
246 </a>
247 </td>
248 </xsl:when>
249 <xsl:otherwise>
250 <td>&#160;</td>
251 </xsl:otherwise>
252 </xsl:choose>
253 <xsl:choose>
254 <xsl:when test="count($up) > 0 and $up != $home">
255 <td>
256 <a accesskey="u">
257 <xsl:attribute name="href">
258 <xsl:call-template name="href.target">
259 <xsl:with-param name="object" select="$up"/>
260 </xsl:call-template>
261 </xsl:attribute>
262 <img src="up.png" width="24" height="24" border="0">
263 <xsl:attribute name="alt">
264 <xsl:call-template name="gentext">
265 <xsl:with-param name="key">nav-up</xsl:with-param>
266 </xsl:call-template>
267 </xsl:attribute>
268 </img>
269 </a>
270 </td>
271 </xsl:when>
272 <xsl:otherwise>
273 <td>&#160;</td>
274 </xsl:otherwise>
275 </xsl:choose>
276 <xsl:choose>
277 <xsl:when test="$home != .">
278 <td>
279 <a accesskey="h">
280 <xsl:attribute name="href">
281 <xsl:call-template name="href.target">
282 <xsl:with-param name="object" select="$home"/>
283 </xsl:call-template>
284 </xsl:attribute>
285 <img src="home.png" width="24" height="24" border="0">
286 <xsl:attribute name="alt">
287 <xsl:call-template name="gentext">
288 <xsl:with-param name="key">nav-home</xsl:with-param>
289 </xsl:call-template>
290 </xsl:attribute>
291 </img>
292 </a>
293 </td>
294 </xsl:when>
295 <xsl:otherwise>
296 <td>&#160;</td>
297 </xsl:otherwise>
298 </xsl:choose>
299 <th width="100%" align="center">
300 <xsl:apply-templates select="$home" mode="object.title.markup"/>
301 </th>
302 <xsl:choose>
303 <xsl:when test="count($next) > 0">
304 <td>
305 <a accesskey="n">
306 <xsl:attribute name="href">
307 <xsl:call-template name="href.target">
308 <xsl:with-param name="object" select="$next"/>
309 </xsl:call-template>
310 </xsl:attribute>
311 <img src="right.png" width="24" height="24" border="0">
312 <xsl:attribute name="alt">
313 <xsl:call-template name="gentext">
314 <xsl:with-param name="key">nav-next</xsl:with-param>
315 </xsl:call-template>
316 </xsl:attribute>
317 </img>
318 </a>
319 </td>
320 </xsl:when>
321 <xsl:otherwise>
322 <td>&#160;</td>
323 </xsl:otherwise>
324 </xsl:choose>
325 </tr>
326 <!--<xsl:if test="name()='refentry'"-->
327 <xsl:choose>
328 <xsl:when test="count($refsections) > 0">
329 <tr>
330 <td colspan="5" class="shortcuts">
331 <xsl:if test="count($sect_synopsis) > 0">
332 <a href="#{$section_id}.synopsis" class="shortcut">Top</a>
333 </xsl:if>
334 <xsl:if test="count($sect_desc) > 0">
335 &#160;|&#160;
336 <a href="#{$section_id}.description" class="shortcut">
337 <xsl:value-of select="./refsect1[@role='desc']/title"/>
338 </a>
339 </xsl:if>
340 <xsl:if test="count($sect_object_hierarchy) > 0">
341 &#160;|&#160;
342 <a href="#{$section_id}.object-hierarchy" class="shortcut">
343 <xsl:value-of select="./refsect1[@role='object_hierarchy']/title"/>
344 </a>
345 </xsl:if>
346 <xsl:if test="count($sect_impl_interfaces) > 0">
347 &#160;|&#160;
348 <a href="#{$section_id}.implemented-interfaces" class="shortcut">
349 <xsl:value-of select="./refsect1[@role='impl_interfaces']/title"/>
350 </a>
351 </xsl:if>
352 <xsl:if test="count($sect_prerequisites) > 0">
353 &#160;|&#160;
354 <a href="#{$section_id}.prerequisites" class="shortcut">
355 <xsl:value-of select="./refsect1[@role='prerequisites']/title"/>
356 </a>
357 </xsl:if>
358 <xsl:if test="count($sect_derived_interfaces) > 0">
359 &#160;|&#160;
360 <a href="#{$section_id}.derived-interfaces" class="shortcut">
361 <xsl:value-of select="./refsect1[@role='derived_interfaces']/title"/>
362 </a>
363 </xsl:if>
364 <xsl:if test="count($sect_implementations) > 0">
365 &#160;|&#160;
366 <a href="#{$section_id}.implementations" class="shortcut">
367 <xsl:value-of select="./refsect1[@role='implementations']/title"/>
368 </a>
369 </xsl:if>
370 <xsl:if test="count($sect_properties) > 0">
371 &#160;|&#160;
372 <a href="#{$section_id}.properties" class="shortcut">
373 <xsl:value-of select="./refsect1[@role='properties']/title"/>
374 </a>
375 </xsl:if>
376 <xsl:if test="count($sect_child_properties) > 0">
377 &#160;|&#160;
378 <a href="#{$section_id}.child-properties" class="shortcut">
379 <xsl:value-of select="./refsect1[@role='child_properties']/title"/>
380 </a>
381 </xsl:if>
382 <xsl:if test="count($sect_style_properties) > 0">
383 &#160;|&#160;
384 <a href="#{$section_id}.style-properties" class="shortcut">
385 <xsl:value-of select="./refsect1[@role='style_properties']/title"/>
386 </a>
387 </xsl:if>
388 <xsl:if test="count($sect_signal_proto) > 0">
389 &#160;|&#160;
390 <a href="#{$section_id}.signals" class="shortcut">
391 <xsl:value-of select="./refsect1[@role='signal_proto']/title"/>
392 </a>
393 </xsl:if>
394 <!--
395 <xsl:if test="count($sect_details) > 0">
396 <a href="#details" class="shortcut">
397 <xsl:value-of select="./refsect1[@id='details']/title"/>
398 </a>
399 &#160;|&#160;
400 </xsl:if>
401 <xsl:if test="count($sect_property_details) > 0">
402 <a href="#property_details" class="shortcut">
403 <xsl:value-of select="./refsect1[@id='property_details']/title"/>
404 </a>
405 &#160;|&#160;
406 </xsl:if>
407 <xsl:if test="count($sect_child_property_details) > 0">
408 <a href="#child_property_details" class="shortcut">
409 <xsl:value-of select="./refsect1[@id='property_child_details']/title"/>
410 </a>
411 &#160;|&#160;
412 </xsl:if>
413 <xsl:if test="count($sect_style_property_details) > 0">
414 <a href="#style_property_details" class="shortcut">
415 <xsl:value-of select="./refsect1[@id='style_property_details']/title"/>
416 </a>
417 &#160;|&#160;
418 </xsl:if>
419 <xsl:if test="count($sect_signals) > 0">
420 <a href="#signals" class="shortcut">
421 <xsl:value-of select="./refsect1[@id='signals']/title"/>
422 </a>
423 &#160;|&#160;
424 </xsl:if>
426 </td>
427 </tr>
428 </xsl:when>
429 <!-- this is not yet very nice, as it requires all glossdic/indexdiv
430 elements having a anchor element. maybe we can customize the xsl
431 to automaticaly create local anchors
433 <xsl:when test="count($glssections) > 0">
434 <tr>
435 <td colspan="5" class="shortcuts">
436 <xsl:for-each select="./glossdiv">
437 <xsl:if test="position() > 1">
438 &#160;|&#160;
439 </xsl:if>
440 <a class="shortcut">
441 <xsl:attribute name="href">#gls<xsl:value-of select="./title"/></xsl:attribute>
442 <xsl:value-of select="./title"/>
443 </a>
444 </xsl:for-each>
445 </td>
446 </tr>
447 </xsl:when>
448 <xsl:when test="count($idxsections) > 0">
449 <tr>
450 <td colspan="5" class="shortcuts">
451 <xsl:for-each select="./indexdiv/indexdiv">
452 <xsl:if test="position() > 1">
453 &#160;|&#160;
454 </xsl:if>
455 <a class="shortcut">
456 <xsl:attribute name="href">#idx<xsl:value-of select="./title"/></xsl:attribute>
457 <xsl:value-of select="./title"/>
458 </a>
459 </xsl:for-each>
460 </td>
461 </tr>
462 </xsl:when>
463 </xsl:choose>
464 </table>
465 </xsl:if>
466 </xsl:template>
468 <xsl:template name="footer.navigation">
469 </xsl:template>
471 <!-- avoid creating multiple identical indices
472 if the stylesheets don't support filtered indices
474 <xsl:template match="index">
475 <xsl:variable name="has-filtered-index">
476 <xsl:call-template name="version-greater-or-equal">
477 <xsl:with-param name="ver1" select="$VERSION" />
478 <xsl:with-param name="ver2">1.66</xsl:with-param>
479 </xsl:call-template>
480 </xsl:variable>
481 <xsl:if test="($has-filtered-index = 1) or (count(@role) = 0)">
482 <xsl:apply-imports/>
483 </xsl:if>
484 </xsl:template>
486 <xsl:template match="index" mode="toc">
487 <xsl:variable name="has-filtered-index">
488 <xsl:call-template name="version-greater-or-equal">
489 <xsl:with-param name="ver1" select="$VERSION" />
490 <xsl:with-param name="ver2">1.66</xsl:with-param>
491 </xsl:call-template>
492 </xsl:variable>
493 <xsl:if test="($has-filtered-index = 1) or (count(@role) = 0)">
494 <xsl:apply-imports/>
495 </xsl:if>
496 </xsl:template>
498 <xsl:template match="para">
499 <xsl:choose>
500 <xsl:when test="@role = 'gallery'">
501 <div class="container">
502 <div class="gallery-spacer"> </div>
503 <xsl:apply-templates mode="gallery.mode"/>
504 <div class="gallery-spacer"> </div>
505 </div>
506 </xsl:when>
507 <xsl:otherwise>
508 <xsl:apply-imports/>
509 </xsl:otherwise>
510 </xsl:choose>
511 </xsl:template>
513 <xsl:template match="link" mode="gallery.mode">
514 <div class="gallery-float">
515 <xsl:apply-templates select="."/>
516 </div>
517 </xsl:template>
519 <!-- add gallery handling to refnamediv template -->
520 <xsl:template match="refnamediv">
521 <div class="{name(.)}">
522 <table width="100%">
523 <tr><td valign="top">
524 <xsl:call-template name="anchor"/>
525 <xsl:choose>
526 <xsl:when test="$refentry.generate.name != 0">
527 <h2>
528 <xsl:call-template name="gentext">
529 <xsl:with-param name="key" select="'RefName'"/>
530 </xsl:call-template>
531 </h2>
532 </xsl:when>
533 <xsl:when test="$refentry.generate.title != 0">
534 <h2>
535 <xsl:choose>
536 <xsl:when test="../refmeta/refentrytitle">
537 <xsl:apply-templates select="../refmeta/refentrytitle"/>
538 </xsl:when>
539 <xsl:otherwise>
540 <xsl:apply-templates select="refname[1]"/>
541 </xsl:otherwise>
542 </xsl:choose>
543 </h2>
544 </xsl:when>
545 </xsl:choose>
547 <xsl:apply-templates/>
548 </p>
549 </td>
550 <td valign="top" align="right">
551 <!-- find the gallery image to use here
552 - determine the id of the enclosing refentry
553 - look for an inlinegraphic inside a link with linkend == refentryid inside a para with role == gallery
554 - use it here
556 <xsl:variable name="refentryid" select="../@id"/>
557 <xsl:apply-templates select="//para[@role = 'gallery']/link[@linkend = $refentryid]/inlinegraphic"/>
558 </td></tr>
559 </table>
560 </div>
561 </xsl:template>
563 <!-- add anchors for index sections -->
564 <xsl:template match="indexdiv">
565 <a><xsl:attribute name="name">idx<xsl:value-of select="./title"/></xsl:attribute></a>
566 <xsl:apply-templates/>
567 </xsl:template>
569 <!-- add anchors for glossary sections -->
570 <xsl:template match="glossdiv">
571 <a><xsl:attribute name="name">gls<xsl:value-of select="./title"/></xsl:attribute></a>
572 <xsl:apply-templates/>
573 </xsl:template>
575 <!-- Exterminate any trace of indexterms in the main flow -->
576 <xsl:template match="indexterm">
577 </xsl:template>
579 <!-- Extra link on the right side of doc-blobs -->
580 <xsl:template name="user.format.extralinks">
581 <xsl:if test="../ulink[@role='extralinks']">
582 <span class="extralinks">
583 <xsl:for-each select="../ulink[@role='extralinks']">
584 <xsl:if test="position() = 1">[&#160;</xsl:if>
585 <xsl:if test="position() > 1">&#160;|&#160;</xsl:if>
587 <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
588 <xsl:copy-of select="text()" />
589 </a>
590 <xsl:if test="position() = last()">&#160;]</xsl:if>
591 </xsl:for-each>
592 </span>
593 </xsl:if>
594 <!--xsl:copy-of select="text()" /-->
595 <xsl:apply-templates/>
596 </xsl:template>
598 <xsl:template match="//refsect2/ulink[@role='extralinks']"/>
599 <xsl:template match="//refsect1/ulink[@role='extralinks']"/>
601 <xsl:template match="//refsect2/title">
602 <h3><xsl:call-template name="user.format.extralinks"/></h3>
603 </xsl:template>
605 <xsl:template match="//refsect1/title">
606 <h2><xsl:call-template name="user.format.extralinks"/></h2>
607 </xsl:template>
609 <!-- ==================================================================== -->
611 <xsl:template match="acronym">
612 <xsl:call-template name="generate.acronym.link"/>
613 </xsl:template>
615 <xsl:template name="generate.acronym.link">
616 <xsl:param name="acronym">
617 <xsl:apply-templates/>
618 </xsl:param>
619 <!--
620 We use for-each to change context to the database document because key()
621 only locates elements in the same document as the context node!
624 <xsl:param name="value" >
625 <xsl:value-of select="//glossentry/glossterm[text()=$acronym]/../glossdef/para[1]" />
626 </xsl:param>
627 <xsl:choose>
628 <xsl:when test="$value=''">
629 <!-- debug -->
630 <xsl:message>
631 In gtk-doc.xsl: For acronym (<xsl:value-of select="$acronym"/>) no value found!
632 </xsl:message>
634 <xsl:attribute name="href">
635 <xsl:text>http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=</xsl:text>
636 <xsl:value-of select="$acronym"/>
637 </xsl:attribute>
638 <xsl:call-template name="inline.charseq"/>
639 </a>
640 </xsl:when>
641 <xsl:otherwise>
642 <!-- found -->
643 <acronym>
644 <xsl:attribute name="title">
645 <xsl:value-of select="$value"/>
646 </xsl:attribute>
647 <xsl:call-template name="inline.charseq"/>
648 </acronym>
649 </xsl:otherwise>
650 </xsl:choose>
651 </xsl:template>
653 </xsl:stylesheet>