History | Edit

Oxygen XML Editor makes it easy to create reusable content components from existing topic content.
Note: To ensure that the topic file that contains the reusable component is a valid container for just the reusable content component, without having to include the other elements required by a standard topic type, Oxygen XML Editor creates a specialized topic type on the fly. This specialization is designed to make sure that the content is compatible with the topic type from which it is created.

Follow these steps to create a reusable component:

  1. In Author mode, select the content you want to make into a reusable component.
  2. Select the Create Reusable Component action that is available in the DITA menu or the Reuse submenu of the contextual menu.
    The Create Reusable Component dialog box is displayed.
  3. Use the Reuse Content drop-down list to select the scope of the content to be made reusable. It allows you to select how much of the current content you want to make reusable. The choices presented include the element at the current cursor position and its ancestor elements.
  4. Add a description. This becomes the title of the topic that contains the reusable component, but is not part of the reusable content. It is just to help you identify the reusable content and will not become part of your output.
  5. If you want to replace the extracted content with a reference to the new component you should leave the Replace selection with content reference option selected. This is recommended, since the point of reuse is to maintain only one copy of the content.
  6. Select a file name and location to save the topic containing the reusable component and click Save. It is considered best practice to save or store reusable components in an area set aside for that purpose.
    If the Replace selection with content reference option was selected, Oxygen XML Editor replaces the current content with a conref attribute. The content of the content reference will be displayed in your current topic with a gray background, but it will no longer be editable since it is stored in a separate file. To edit the source of the reusable component, click the Edit Content icon at the beginning of the inserted content.

You now have a reusable component that you can include in other topics by using the Insert Reusable Component action that is available in the DITA menu or the Reuse submenu of the contextual menu. You can also reference this new reusable component by using a content reference or content key reference.