Debian Codegraph @

en/refpages/elements/xref/refentry.xml

raw symbols SCIP
1 <refentry id="xref.element">
2 <?dbhtml filename="xref.html"?>
3 <refentryinfo>
4 <pubdate>$Date$</pubdate>
5 <releaseinfo>$Revision$</releaseinfo>
6 </refentryinfo>
7
8 <refmeta>
9 <indexterm><primary>elements</primary>
10 <secondary>xref</secondary></indexterm>
11 <refentrytitle>xref</refentrytitle>
12 <refmiscinfo>Element</refmiscinfo>
13 </refmeta>
14 <refnamediv>
15 <refname>xref</refname>
16 <refpurpose>&xref.purpose;</refpurpose>
17 </refnamediv>
18
19 &xref.synopsis.gen;
20 <refsect1 condition='ref.description'><title>Description</title>
21
22 <para>
23 The <sgmltag>XRef</sgmltag> element forms a cross-reference from the location
24 of the <sgmltag>XRef</sgmltag> to the element to which it points. Unlike
25 <sgmltag>Link</sgmltag> and the other cross-referencing elements, <sgmltag>XRef</sgmltag>
26 is empty. The processing system has to generate appropriate cross-reference
27 text for the reader.
28 </para>
29
30 <refsect2 id="dbreproc.xref"><title>Processing expectations</title>
31
32 <para>Under ordinary circumstances, the <sgmltag>xref</sgmltag>
33 points to the some element with its
34 <sgmltag class="attribute">linkend</sgmltag> attribute and the processing system
35 generates appropriate cross reference text. There are three
36 ways for the author to influence the generated text:</para>
37
38 <orderedlist>
39 <listitem>
40 <para>If the <sgmltag class='attribute'>endterm</sgmltag> attribute is specified
41 on <sgmltag>xref</sgmltag>, the
42 content of the element pointed to by <sgmltag class='attribute'>endterm</sgmltag>
43 will be used as the text of the cross-reference.
44 </para>
45 </listitem>
46
47 <listitem>
48 <para>Otherwise, if the object <emphasis>pointed to</emphasis> has a
49 specified <sgmltag class='attribute'>XRefLabel</sgmltag>, the content of
50 that attribute will be used as the cross-reference text.
51 </para>
52 </listitem>
53
54 <listitem>
55 <para>Finally, the author may specify a keyword (or other information) in the
56 <sgmltag class="attribute">xrefstyle</sgmltag> attribute. Unlike
57 <sgmltag class="attribute">endterm</sgmltag> and
58 <sgmltag class="attribute">xreflabel</sgmltag> which have rigid semantics,
59 the content of the <sgmltag class="attribute">xrefstyle</sgmltag> attribute is simply
60 additional information for the processing system. What effect it has, if any,
61 is dependent on the processing system.</para>
62 </listitem>
63 </orderedlist>
64
65 </refsect2>
66
67 &xref.parents.gen;
68
69 </refsect1>
70 <refsect1 condition='ref.elem.attrdesc'><title>Attributes</title>
71 <variablelist>
72 <varlistentry><term>endterm</term>
73 <listitem>
74 <para>
75 <sgmltag class="attribute">Endterm</sgmltag> points to the element whose content
76 is to be used as the text of the link.
77 </para>
78 </listitem>
79 </varlistentry>
80 <varlistentry><term>linkend</term>
81 <listitem>
82 <para>
83 <sgmltag class="attribute">Linkend</sgmltag> points to the target of the cross reference.
84 </para>
85 </listitem>
86 </varlistentry>
87 </variablelist>
88 </refsect1>
89 <refsect1 condition='ref.elem.seealso'><title>See Also</title>
90 &xref.seealso.gen;
91 </refsect1>
92 <refsect1><title>Examples</title>
93
94 <para>
95 Consider the following example:
96 </para>
97
98 <informalexample role="example-source">
99 <programlisting>&xref.example.1.txt;</programlisting>
100 </informalexample>
101
102 <para>
103 One reasonable rendering for the content of the first chapter of
104 this book is the following:
105 </para>
106
107 <para>
108 This paragraph demonstrates several features of
109 <sgmltag>XRef</sgmltag>.
110 </para>
111
112 <itemizedlist>
113 <listitem><para>A straight link generates the
114 cross-reference text: Chapter 2, <quote>The Second Chapter</quote>
115 </para></listitem>
116 <listitem><para>A link to an element with an
117 <sgmltag class="attribute">XRefLabel</sgmltag>:
118 Chapter the Third.
119 </para></listitem>
120 <listitem><para>A link with an
121 <sgmltag class="attribute">EndTerm</sgmltag>:
122 Chapter 4.
123 </para></listitem>
124 </itemizedlist>
125
126 <para>
127 Of course, in an online system, these references would also
128 be links to the appropriate chapters.
129 </para>
130
131 &xref.example.seealso.gen;
132 </refsect1>
133 </refentry>
134