Creating a DITA Content Reference

A DITA content reference, or conref, is a mechanism for inserting a piece of content from one topic into another topic. It is one of the main content reuse features of DITA.

In order for a conref to be created, the source content must have an id attribute that the conref can reference. Therefore, creating a conref may require both adding an id to the content to be reused and inserting a conref into the topic that reuses the referenced content.

To add an id to a DITA element in a topic, place the caret on the element and press Alt+Enter to bring up the in-place attribute editor. Enter id as the name of the attribute and a value of your choice in the value field. Note that the element may already have an id since in some cases Oxygen XML Editor generates an id value when the id attribute is created.

To create a content reference:

  1. In Author mode, place the insertion point when you want the reused content to be inserted.
  2. Click the Insert a DITA Content Reference button on the DITA toolbar. The Insert Content Reference dialog is displayed.
  3. Select the Element ID of the element that you want to insert, and verify the content in the Preview pane.
  4. Make any other selections you need in the Insert Content Reference dialog.
  5. Click Insert and close.

An alternate way to reuse content is to use the Oxygen XML Editor Create Reusable Component... and Insert Reusable Component... actions, which handle the details of creating an id and conref and creates reusable component files, which are separate from your normal content files. This can help you manage your reusable content more effectively.

You can also insert reusable content using content key references, which may make reusable content easier to manage.