Edit online

Customizing the Content Completion Assistant Using a Configuration File

Oxygen XML Author gathers information from the associated schemas (DTDs, XML Schema, RelaxNG) to determine the proposals that appear in the Content Completion Assistant. Oxygen XML Author also includes support that allows you to customize the Content Completion Assistant to suit your specific needs.

There are two ways to customize the Content Completion Assistant in Oxygen XML Author:

Setting up the Content Completion Configuration File

To customize the configuration file for the Content Completion Assistant, follow these steps:
  1. Create a new resources folder (if it does not already exist) in the frameworks directory for the particular document type (for example, OXYGEN_INSTALL_DIR/frameworks/dita/resources).
  2. Open the Preferences dialog box (Options > Preferences) and go to Document Type Association. Select the particular document type, click the Edit button, and in the Classpath tab add a link to that resources folder (if it does not already exist).
  3. Create a new configuration file or edit an existing one.
    1. To easily create a new configuration file, you can use the Content Completion Configuration document template that is included in Oxygen XML Author (File > New > Framework templates > Oxygen Extensions > Content Completion Configuration). The document template includes details about how each element and attribute is used in the configuration file.
    2. If a configuration file (cc_config.xml) already exists for the particular document type (in the resources folder), you can modify this existing file.
    3. If you extend a framework, you need to copy the content of the cc_config.xml file from the base framework and modify it (e.g. create a resources folder in your framework extension folder and place the file there). You also need to make sure that the folder that contains the cc_config.xml file in your extension (e.g. resources) is listed in the Classpath tab before the one from the base framework.

      If you only want to make small changes or add extra rules in your custom content completion configuration file, you need to name it cc_config_ext.xml and all the rules inside it are merged with the base cc_config.xml file. The merging is done by taking all the rules specified in the cc_config_ext.xml file into consideration after processing the set of rules from the base cc_config.xml file.

  4. Make the appropriate changes to your custom configuration file.
  5. Save the file in the resources folder for the particular document type, using the fixed name: cc_config.xml (for example, OXYGEN_INSTALL_DIR/frameworks/dita/resources/cc_config.xml).
  6. Restart the application and open an XML document. In the Content Completion Assistant you should see your customizations.
    Tip:
    In some cases, you can simply use the Refresh (F5) action to test your customizations, without having to restart the application.
    Attention:
    In the Classpath tab, if you have references to multiple resources folders, each with its own cc_config.xml file, the first reference listed in the Classpath tab takes precedence and the multiple configuration files are not combined.

Resources

To see more ideas for various advanced customization possibilities (including how to insert or reject proposals for the content completion assistant), watch our Webinar: Working with DITA in Oxygen - Customizing the Editing Experience.