Linking in DITA Topics

Using Copy/Paste Actions to Insert a Cross Reference

Oxygen XML Editor also includes support for inserting cross references with simple copy/paste actions. The copied content must be an entire DITA XML element with an ID attribute or a topicref. Also, the location in the document where you paste the link must be valid, although as long as the Smart paste and drag and drop option is enabled in the Schema Aware preferences page, if you try to paste it in an invalid location, Oxygen XML Editor will attempt to place it in a valid location, and may prompt you with one or more choices for where to place it. You can paste the link as a cross reference with the link expressed in an href attribute or in a keyref attribute.

To insert a cross reference link (expressed in an href attribute) using copy/paste actions, follow these steps:
  1. Copy an entire DITA element that has an ID attribute assigned to it or a topicref.
  2. Place the cursor at a location, where you want to insert the link.
  3. Select the Paste as Link action from the Paste Special submenu from the contextual menu.
To insert a cross reference link (expressed in a keyref attribute) using copy/paste actions, follow these steps:
  1. In the DITA Maps Manager view, make sure that the Root map combo box points to the correct map that stores the keys.
  2. Make sure the topic that contains the content you want to reference has a key assigned to it. To assign a key, right-click the topic with its parent map opened in the DITA Maps Manager, select Edit Properties, and enter a value in the Keys field.
  3. Copy an entire DITA element that has an ID attribute assigned to it from a topic with an assigned key, or a topicref from a DITA map.
  4. Place the cursor at a location, where you want to insert the link.
  5. Select the Paste as Link (keyref) action from the Paste Special submenu from the contextual menu.