$Date$$Revision$elementsolinkolinkElementolink&olink.purpose;
&olink.synopsis.gen;
Description
Unlike Link and ULink, the semantics of
OLink are application-specific. OLink provides
a mechanism for establishing links across documents, where
ID/IDREF linking is not possible and ULink is inappropriate.
In general terms, the strategy employed by OLink is to
point to the target document via an
external general entity, and point
into that document in some application-specific way.
Processing expectations
&format.inline;
OLink points to its target primarily with the
TargetDocEnt attribute.
TargetDocEnt must be the name of an
entity (previously declared in the &DTD; or in the document
subset).
Because TargetDocEnt is an entity attribute,
the entity used as its value must be declared with a notation.
Because the target is usually another &SGML; or &XML; document, the
notation SGML is most often used:
]]>
The semantics of the link are controlled by three other attributes:
LinkMode,
LocalInfo, and
Type.
The LinkMode
attribute points to a ModeSpec. The content of
ModeSpec describes the semantic of the link in an entirely
application-specific way.
The values of
LocalInfo and
Type may also influence the application.
For example, if the ModeSpec describes some sort of query,
LocalInfo might hold the query text
(allowing multiple OLinks to use the same ModeSpec
to achieve different queries with the same query engine).
Linking elements must not be nested within other linking
elements (including themselves). Because DocBook is harmonizing
towards &XML;, this restriction cannot easily be enforced by the &DTD;. The
processing of nested linking elements is undefined.
&FutureChanges;
&fu.interfacedefinition;
&olink.parents.gen;
&olink.children.gen;
AttributeslinkmodeLinkMode points to the ModeSpec
which provides additional application-specific information for resolving this
OLink.
localinfoLocalInfo hold additional information
that may be used with the ModeSpec
(pointed to by LinkMode) by the application
when resolving this OLink.
targetdocentTargetDocEnt specifies the name of an entity
that is to be used as part of the OLink. Exactly how the
link is resolved is application dependent and may be influenced by the
MoreInfo and
LocalInfo attributes.
typeType is available for application-specific
customization of the linking behavior.
See Also
&olink.seealso.gen;
Examples
In this example, we see how an OLink might be used for
searching. Here the ModeSpec describes the search query
(in a fictitious and entirely concocted syntax): look in the titles
of sections and return links using the title as the text of the link.
When the user selects the link, the application is expected to perform
the query and then might display the list of titles as a pop-up window
in the user interface.
&olink.example.1.txt;
&olink.example.seealso.gen;