81. selectLink
Prev | Chapter 6. Commands written in the Java™ programming language | Next

## 81. selectLink

Parameter syntax:

    [ '[link_type_name]' ]?
    'target' | 'source' | 'nextSource' | 'previousSource' | 'oppositeEnd'

This command allows to navigate between elements acting as link sources (simply called links) and elements acting as link targets (also called anchors).

This commands works when a `linkType` configuration element in XMLmind XML Editor - Configuration and Deployment has been defined in the configuration associated to the document being edited or, more simply, when the DTD or Schema of the document being edited makes use of `ID`/`IDREF`/`IDREFS`.

This command supports elements which act at the same type as a link source and as a link target (XHTML example: `<a id="here" href="#there">`). It also supports elements which are links to multiple targets (DocBook example: `<callout arearefs="co1 co2">`). When there is an ambiguity, this command displays a dialog box allowing the user to choose the destination.

In some cases (XHTML example: `<a href="foo.html#bar">`), this command allows to select an destination found in a document other than the one being edited. In such case, the user is prompted to confirm that she/he really wants to open this other document. This confirmation dialog box also allows the user to choose to open the other document in read-only mode.

target

  An element acting as a link must be implicitly or explicitly selected. Scrolls to and selects the element which is the target of this link (if found).

source

  An element acting as an anchor (that is, a link target) must be implicitly or explicitly selected. Scrolls to and selects the first element of the document which is a link to this anchor (if found).

nextSource

  An element acting as a link must be implicitly or explicitly selected. Scrolls to and selects following link element targeting the same anchor (if found).

previousSource

  An element acting as a link must be implicitly or explicitly selected. Scrolls to and selects preceding link element targeting the same anchor (if found).

oppositeEnd

  An element acting as an anchor or acting as a link must be implicitly or explicitly selected. Scrolls to and selects opposite link end (if found).

An XXE configuration file may contain several `linkType` elements, each one having a different name. See Section 15, “linkType” in XMLmind XML Editor - Configuration and Deployment. Unless option [`link_type_name`] has been specified, this command acts on all types of links and anchors. If option [`link_type_name`] is specified, this command will act only on links and anchors belonging to the `linkType` whose name is `link_type_name`.

Examples:

    selectLink target
    selectLink [formControls] target
    selectLink oppositeEnd

Prev | Up | Next
80. selectConvertedFile | Home | 82. selectPrinter