Edit online

Creating a Reusable Content Component

Oxygen XML Editor makes it easy to create a reusable component from existing topic content.
Note: To ensure that the topic file that contains the reusable component is a valid container for the reusable content component, Oxygen XML Editor attempts to use the same schema information in the current topic for the file that contains the reused component. If it cannot create a valid instance of the reused content file with this approach, the application creates a specialized topic type automatically. This specialization is designed to make sure that the content is compatible with the topic type that it is created from. You can make changes to the configuration file (OXYGEN_INSTALL_DIR\frameworks\dita\reuse\reuse_configuration.properties) or override it from a framework extension to control if the created reusable component file should be based on the currently edited topic or it should be an automatically created DITA specialization topic.

Follow these steps to create a reusable component:

  1. In Author mode, select the content you want to make into a reusable component (or place the cursor inside an element you want to reuse).
  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 is used as a description for the reusable component, but is not part of the reused content. It is just to help you identify the reusable content and will not become part of your output.
  5. If the Replace selection with content reference option is selected, the selection in the current topic will be replaced with a content reference (@conref) that points to the new reusable component. If multiple elements are selected (for example, multiple steps or list items), the selection is replaced with a content reference range (@conref and @conrefend).
  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.

A file is created that contains one reusable component. You can reference the reused content in other topics by using a content reference or content key reference. Also, if the Replace selection with content reference option was selected, Oxygen XML Editor replaces the selected content with a content reference that will be displayed in your current topic with a gray background and it can only be edited in the source file (the new reusable component). To edit the source file, click the Edit Content icon at the beginning of the content reference.