source: stylesheets/lfs-xsl/docbook-xsl-1.78.1/params/olink.doctitle.xml@ f6e9c180

7.6-systemd 7.7-systemd 7.8-systemd 7.9-systemd
Last change on this file since f6e9c180 was b1a51ac1, checked in by Krejzi <krejzi@…>, 11 years ago

Import new branch

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd/BOOK@10389 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 4.6 KB
Line 
1<refentry xmlns="http://docbook.org/ns/docbook"
2 xmlns:xlink="http://www.w3.org/1999/xlink"
3 xmlns:xi="http://www.w3.org/2001/XInclude"
4 xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
5 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 version="5.0" xml:id="olink.doctitle">
7<refmeta>
8<refentrytitle>olink.doctitle</refentrytitle>
9<refmiscinfo class="other" otherclass="datatype">list</refmiscinfo>
10<refmiscinfo class="other" otherclass="value">no</refmiscinfo>
11<refmiscinfo class="other" otherclass="value">yes</refmiscinfo>
12<refmiscinfo class="other" otherclass="value">maybe</refmiscinfo>
13</refmeta>
14<refnamediv>
15<refname>olink.doctitle</refname>
16<refpurpose>show the document title for external olinks?</refpurpose>
17
18</refnamediv>
19<refsynopsisdiv> <src:fragment xml:id="olink.doctitle.frag">
20<xsl:param name="olink.doctitle">no</xsl:param>
21</src:fragment>
22</refsynopsisdiv>
23<refsection><info><title>Description</title></info>
24
25<para>When olinks between documents are resolved, the generated text
26may not make it clear that the reference is to another document.
27It is possible for the stylesheets to append the other document's
28title to external olinks. For this to happen, two parameters must
29be set.</para>
30<itemizedlist>
31<listitem>
32<para>This <parameter>olink.doctitle</parameter> parameter
33should be set to either <literal>yes</literal> or <literal>maybe</literal>
34to enable this feature.
35</para>
36</listitem>
37<listitem>
38<para>And you should also set the <parameter>current.docid</parameter>
39parameter to the document id for the document currently
40being processed for output.
41</para>
42</listitem>
43</itemizedlist>
44
45<para>
46Then if an olink's <literal>targetdoc</literal> id differs from
47the <literal>current.docid</literal> value, the stylesheet knows
48that it is a reference to another document and can
49append the target document's
50title to the generated olink text. </para>
51
52<para>The text for the target document's title is copied from the
53olink database from the <tag>ttl</tag> element
54of the top-level <tag>div</tag> for that document.
55If that <tag>ttl</tag> element is missing or empty,
56no title is output.
57</para>
58
59<para>The supported values for <parameter>olink.doctitle</parameter> are:
60</para>
61<variablelist>
62<varlistentry>
63<term><literal>yes</literal></term>
64<listitem>
65<para>
66Always insert the title to the target document if it is not
67the current document.
68</para>
69</listitem>
70</varlistentry>
71<varlistentry>
72<term><literal>no</literal></term>
73<listitem>
74<para>
75Never insert the title to the target document, even if requested
76in an <tag class="attribute">xrefstyle</tag> attribute.
77</para>
78</listitem>
79</varlistentry>
80<varlistentry>
81<term><literal>maybe</literal></term>
82<listitem>
83<para>
84Only insert the title to the target document, if requested
85in an <tag class="attribute">xrefstyle</tag> attribute.
86</para>
87</listitem>
88</varlistentry>
89</variablelist>
90<para>An <tag class="attribute">xrefstyle</tag> attribute
91may override the global setting for individual olinks.
92The following values are supported in an
93<tag class="attribute">xrefstyle</tag>
94attribute using the <literal>select:</literal> syntax:
95</para>
96
97<variablelist>
98<varlistentry>
99<term><literal>docname</literal></term>
100<listitem>
101<para>
102Insert the target document name for this olink using the
103<literal>docname</literal> gentext template, but only
104if the value of <parameter>olink.doctitle</parameter>
105is not <literal>no</literal>.
106</para>
107</listitem>
108</varlistentry>
109<varlistentry>
110<term><literal>docnamelong</literal></term>
111<listitem>
112<para>
113Insert the target document name for this olink using the
114<literal>docnamelong</literal> gentext template, but only
115if the value of <parameter>olink.doctitle</parameter>
116is not <literal>no</literal>.
117</para>
118</listitem>
119</varlistentry>
120<varlistentry>
121<term><literal>nodocname</literal></term>
122<listitem>
123<para>
124Omit the target document name even if
125the value of <parameter>olink.doctitle</parameter>
126is <literal>yes</literal>.
127</para>
128</listitem>
129</varlistentry>
130</variablelist>
131<para>Another way of inserting the target document name
132for a single olink is to employ an
133<tag class="attribute">xrefstyle</tag>
134attribute using the <literal>template:</literal> syntax.
135The <literal>%o</literal> placeholder (the letter o, not zero)
136in such a template
137will be filled in with the target document's title when it is processed.
138This will occur regardless of
139the value of <parameter>olink.doctitle</parameter>.
140</para>
141<para>Note that prior to version 1.66 of the XSL stylesheets,
142the allowed values for this parameter were 0 and 1. Those
143values are still supported and mapped to 'no' and 'yes', respectively.
144</para>
145</refsection>
146</refentry>
Note: See TracBrowser for help on using the repository browser.