summaryrefslogtreecommitdiff
path: root/doc/yelp-xsl/C/mal.link.tooltip.page
blob: 7e98c9e72b25973a2427288e3c948879b7fbbe2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" style="xslt-template" id="mal.link.tooltip">
 <info>
  <link type="guide" xref="mal-link" group="templates"/>
  <link type="guide" xref="templates" group="mal"/>
  <desc>Output a tooltip for a <sys>link</sys> element.</desc>
  <revision version="3.18" date="2015-06-06" status="final"/>
 </info>
 <title>mal.link.tooltip</title>
 <synopsis>
  <title>Parameters</title>
  <terms>
   <item>
    <title><code>$node</code></title>
    <p>The <sys>link</sys> or other element creating the link.</p>
   </item>
   <item>
    <title><code>$action</code></title>
    <p>The <sys>action</sys> attribute of <code>$node</code>.</p>
   </item>
   <item>
    <title><code>$xref</code></title>
    <p>The <sys>xref</sys> attribute of <code>$node</code>.</p>
   </item>
   <item>
    <title><code>$href</code></title>
    <p>The <sys>href</sys> attribute of <code>$node</code>.</p>
   </item>
   <item>
    <title><code>$role</code></title>
    <p>A space-separated list of link roles, used to select the appropriate title.</p>
   </item>
   <item>
    <title><code>$info</code></title>
    <p>An <sys>info</sys> element that overrides the info found in a target node.</p>
   </item>
  </terms>
 </synopsis>
 <p>This template outputs a text-only tooltip for a link. If <code>$xref</code> points to a
 valid page or section, the text title from that page or section will be used.
 If the target does not specify a text title, the primary title is used.</p>
 <p>For inline links, <code>$node</code> should be the <sys>link</sys> element. For links from a
 <sys>links</sys> element, <code>$node</code> should be that <sys>links</sys> element, or the containing
 element when the <sys>links</sys> element is implicit.</p>
 <p>This template first calls <code xref="mal.link.tooltip.custom">mal.link.tooltip.custom</code> with the same arguments.
 If that template returns a non-empty string, it is used as the return value,
 overriding any other behavior of this template.</p>
 <p>If only <code>$href</code> is provided, that URL is used as the tooltip. If a target
 page or section cannot be found, <code>$xref</code> is used as the text content. Special
 tooltips may be provided for certain URI schemes.</p>
 <p>Normally, this template automatically looks up information from a targret node
 according to the <code>$xref</code> parameter. However, if the <code>$info</code> parameter is given,
 information in that node set is used instead. This is useful for external info
 links, where the target information is provided as child elements to the <sys>link</sys>
 element.</p>
 <list style="compact">
  <title>Calls Parameters</title>
  <item>
   <p><link xref="mal.cache"/></p>
  </item>
  <item>
   <p><link xref="mal.cache.file"/></p>
  </item>
  <item>
   <p><link xref="mal.link.default_root"/></p>
  </item>
  <item>
   <p><link xref="mal.link.extension"/></p>
  </item>
  <item>
   <p><link xref="mal.link.prefix"/></p>
  </item>
 </list>
 <list style="compact">
  <title>Calls Keys</title>
  <item>
   <p><link xref="mal.cache.key"/></p>
  </item>
 </list>
 <list style="compact">
  <title>Calls Templates</title>
  <item>
   <p><link xref="l10n.gettext"/></p>
  </item>
  <item>
   <p><link xref="mal.link.tooltip.custom"/></p>
  </item>
  <item>
   <p><link xref="mal.link.xref.linkid"/></p>
  </item>
  <item>
   <p><link xref="utils.email_address"/></p>
  </item>
 </list>
</page>