Debian Codegraph @

ru/refpages/elements/olink/refentry.xml

raw symbols SCIP
1 <refentry id="olink.element">
2 <?dbhtml filename="olink.html"?>
3 <refentryinfo>
4 <pubdate>$Date$</pubdate>
5 <releaseinfo>$Revision$</releaseinfo>
6 </refentryinfo>
7
8 <refmeta>
9 <indexterm><primary>elements</primary>
10 <secondary>olink</secondary></indexterm>
11 <refentrytitle>olink</refentrytitle>
12 <refmiscinfo>Element</refmiscinfo>
13 </refmeta>
14 <refnamediv>
15 <refname>olink</refname>
16 <refpurpose>&olink.purpose;</refpurpose>
17 </refnamediv>
18
19 &olink.synopsis.gen;
20 <refsect1 condition='ref.description'><title>Description</title>
21
22 <para>
23 Unlike <sgmltag>Link</sgmltag> and <sgmltag>ULink</sgmltag>, the semantics of
24 <sgmltag>OLink</sgmltag> are application-specific. <sgmltag>OLink</sgmltag> provides
25 a mechanism for establishing links across documents, where
26 ID/IDREF linking is not possible and <sgmltag>ULink</sgmltag> is inappropriate.
27 </para>
28
29 <para>
30 In general terms, the strategy employed by <sgmltag>OLink</sgmltag> is to
31 point to the target document via an
32 <link linkend="s-egenent">external general entity</link>, and point
33 into that document in some application-specific way.
34 </para>
35
36 <refsect2><title>Processing expectations</title>
37 <para>
38 &format.inline;
39 </para>
40
41 <para>
42 <sgmltag>OLink</sgmltag> points to its target primarily with the
43 <sgmltag class='attribute'>TargetDocEnt</sgmltag> attribute.
44 <sgmltag class='attribute'>TargetDocEnt</sgmltag> must be the name of an
45 entity (previously declared in the &DTD; or in the <glossterm>document
46 subset</glossterm>).
47 </para>
48
49 <para>
50 Because <sgmltag class='attribute'>TargetDocEnt</sgmltag> is an entity attribute,
51 the entity used as its value must be declared with a notation.
52 Because the target is usually another &SGML; or &XML; document, the
53 notation <literal>SGML</literal> is most often used:
54
55 <screen>
56 <![CDATA[
57 <!ENTITY myotherdoc SYSTEM "myotherdoc.sgm" NDATA SGML>
58 ]]>
59 </screen>
60 </para>
61
62 <para>
63 The semantics of the link are controlled by three other attributes:
64 <sgmltag class='attribute'>LinkMode</sgmltag>,
65 <sgmltag class='attribute'>LocalInfo</sgmltag>, and
66 <sgmltag class='attribute'>Type</sgmltag>.
67 The <sgmltag class='attribute'>LinkMode</sgmltag>
68 attribute points to a <sgmltag>ModeSpec</sgmltag>. The content of
69 <sgmltag>ModeSpec</sgmltag> describes the semantic of the link in an entirely
70 application-specific way.
71 </para>
72 <para>
73 The values of
74 <sgmltag class='attribute'>LocalInfo</sgmltag> and
75 <sgmltag class='attribute'>Type</sgmltag> may also influence the application.
76 For example, if the <sgmltag>ModeSpec</sgmltag> describes some sort of query,
77 <sgmltag class='attribute'>LocalInfo</sgmltag> might hold the query text
78 (allowing multiple <sgmltag>OLink</sgmltag>s to use the same <sgmltag>ModeSpec</sgmltag>
79 to achieve different queries with the same query engine).
80 </para>
81
82 <para>
83 Linking elements must not be nested within other linking
84 elements (including themselves). Because DocBook is harmonizing
85 towards &XML;, this restriction cannot easily be enforced by the &DTD;. The
86 processing of nested linking elements is undefined.
87 </para>
88 </refsect2>
89
90 <refsect2 role='fu' revision="4.0"><title>&FutureChanges;</title>
91 <para>
92 <!--do not index this occurance-->
93 &fu.interfacedefinition;
94 </para>
95 </refsect2>
96
97
98 &olink.parents.gen;
99 &olink.children.gen;
100 </refsect1>
101 <refsect1 condition='ref.elem.attrdesc'><title>Attributes</title>
102 <variablelist>
103 <varlistentry><term>linkmode</term>
104 <listitem>
105 <para>
106 <sgmltag class="attribute">LinkMode</sgmltag> points to the <sgmltag>ModeSpec</sgmltag>
107 which provides additional application-specific information for resolving this
108 <sgmltag>OLink</sgmltag>.
109 </para>
110 </listitem>
111 </varlistentry>
112 <varlistentry><term>localinfo</term>
113 <listitem>
114 <para>
115 <sgmltag class="attribute">LocalInfo</sgmltag> hold additional information
116 that may be used with the <sgmltag>ModeSpec</sgmltag>
117 (pointed to by <sgmltag class="attribute">LinkMode</sgmltag>) by the application
118 when resolving this <sgmltag>OLink</sgmltag>.
119 </para>
120 </listitem>
121 </varlistentry>
122 <varlistentry><term>targetdocent</term>
123 <listitem>
124 <para>
125 <sgmltag class="attribute">TargetDocEnt</sgmltag> specifies the name of an entity
126 that is to be used as part of the <sgmltag>OLink</sgmltag>. Exactly how the
127 link is resolved is application dependent and may be influenced by the
128 <sgmltag class="attribute">MoreInfo</sgmltag> and
129 <sgmltag class="attribute">LocalInfo</sgmltag> attributes.
130 </para>
131 </listitem>
132 </varlistentry>
133 <varlistentry><term>type</term>
134 <listitem>
135 <para>
136 <sgmltag class="attribute">Type</sgmltag> is available for application-specific
137 customization of the linking behavior.
138 </para>
139 </listitem>
140 </varlistentry>
141 </variablelist>
142 </refsect1>
143 <refsect1 condition='ref.elem.seealso'><title>See Also</title>
144 &olink.seealso.gen;
145 </refsect1>
146 <refsect1><title>Examples</title>
147
148 <para>
149 In this example, we see how an <sgmltag>OLink</sgmltag> might be used for
150 searching. Here the <sgmltag>ModeSpec</sgmltag> describes the search query
151 (in a fictitious and entirely concocted syntax): <quote>look in the titles
152 of sections and return links using the title as the text of the link</quote>.
153 When the user selects the link, the application is expected to perform
154 the query and then might display the list of titles as a pop-up window
155 in the user interface.
156 </para>
157
158 <informalexample role="example-source">
159 <programlisting>&olink.example.1.txt;</programlisting>
160 </informalexample>
161
162 &olink.example.seealso.gen;
163 </refsect1>
164 </refentry>
165