Arbortext Command Language > Commands > link
  
link
link [ caret | mouse] [ f | b]
link [ -uriuri | -idrefidref] [ -datadata]
This command traverses a link in the Edit view and executes any commands associated with the link. There are two forms of the link command. The first form is associated with link and linkuri callbacks in the doc_add_callback function. The second form is associated with linkto callback in the doc_add_callback function.
For the first form, the tag type determines the action taken. Examples are shown in the following table:
Link Command Actions
Tag type
Action
_link processing instruction
Attributes on the _link processing instruction determine the nature of the link.
Element with a non-blank ID, IDREF, or IDREFS attribute
Moves the caret forward to the next use of that ID, wrapping if necessary. If a tag has more than one ID name in its attribute values (for example, IDREF field with multiple values, or an IDREF field plus an ID field and both have values), then you are prompted with a list of IDs from which to select. If you link from a tag with one ID, to a tag with multiple IDs, then another tag with multiple IDs, you can be linked to the next use of the ID originally linked to. This lets you cycle through all the references to a given ID without getting hung up on tags that also reference other IDs.
Element declared in the .dcf file with an IDREF or URI attribute
For IDREF attributes, moves the caret to the target. For URI attributes, opens the user's Web browser and displays the URI.
file entity
Opens a separate Edit pane in which you can edit the file entity.
graphic
Opens an associated application, in which you can edit the graphic.
equation
Opens an associated application, in which you can edit the equation.
Following is a description of link command parameters for the first form of the command:
f (the default) — Traverses forward, establishing a new link to a target.
In this case, the link command gets link data from the tag to the left of the cursor if the caret option is used, or from the tag underneath the mouse pointer if the mouse option is used. caret is the default.
b — Traverses backward to the previous location.
The cursor is moved back to the tag from which the most recent link occurred. The location of the mouse or cursor does not affect the link command when linking backwards.
Following is a description of link command parameters for the second form of the command:
-uri — Explicitly provides a URI value for the target for the link.
-idref — Explicitly provides an IDREF value for the target for the link.
-data — A string value that is passed to the linkto callback.
The data provided for the link can be anything relevant to the operation performed by the callback.
Examples
link
link mouse
link b
link -idref help1723
Related Topics
doc_add_callback function