Edit online

Enabling the Outline Pane for DITA and Other Frameworks

Oxygen XML Web Author includes an Outline side-pane that displays a general tag overview of the currently open document. It is enabled and available, by default, for DocBook, TEI, and XHTML documents. However, it is possible to configure other frameworks (such as DITA) to display the pane.

To enable the Outline pane for a custom framework, follow these steps:
  1. Create a configuration file named webAuthorOutlineConfig.xml. The following is an example of what this configuration file looks like for DocBook:
      <structureMode editable="yes" default="no">
        <preferredAttributes names="id xml:id"/> 
      <tocMode editable="yes" default="yes">
        <elements names="section sect1 sect2 sect3 sect4 sect5 simplesect article book"/> 

    Notice that there are two elements that define the two modes: <structureMode> (for the Structure mode that displays the information in the pane as a general tag overview of the current XML document) and <tocMode> (for the Contents mode that displays the information in the pane like a table of contents).

  2. The configuration file must be stored in a folder included in the framework's classpath. To add the folder to the classpath:
    1. In Oxygen XML Editor/Author, go to Options > Preferences > Document Type Association and edit the document type configuration for your custom framework.
    2. In the Classpath tab, add a link to the folder where you stored the configuration file.
      Note: It is important to reference the exact folder that contains the configuration file (it cannot be located in a subfolder within the referenced folder).
  3. Create an archive that only contains your custom framework folder and upload the changes to your framework to Web Author.
Tip: It is also possible to send the Outline pane configuration through the outlineConfigurationProvider loading option. This function that has a callback that receives the JSON configuration as a parameter. It can be set like this:
    e.options.outlineConfigurationProvider = function(callback) {
        callback("{\n" + 
    "    \"structureMode\": {\n" + 
    "        \"editable\": \"yes\",\n" + 
    "        \"defaultMode\": \"no\",\n" + 
    "        \"preferredAttributes\": {\"names\": \"id xml:id\"}\n" + 
    "    },\n" + 
    "    \"tocMode\": {\n" + 
    "        \"editable\": \"yes\",\n" + 
    "        \"defaultMode\": \"yes\",\n" + 
    "        \"elements\": {\"names\": \"topic\"}\n" + 
    "    }\n" + 

How to Configure the Displayed Names of Elements in the Outline Pane

The Contents mode (table of contents mode) uses a heuristic algorithm to present the title (name) for any given element. For advanced use-cases, it is possible to configure the location of the element title presented in the Outline pane.

Here is a DocBook example of what the <tocMode> element would look like for this type of configuration:
  <tocMode editable="no">
    <elements names="section sect1 sect2 sect3 sect4 sect5 simplesect article book"/> 
    <titleLocator element="section" location="title, @spectitle"/>  
    <titleLocator element="section1" location="title"/>  
The value of the @location attribute is a simplified XPath that supports a comma-separated list of:
  • Element names
  • Attributes (prefixed with @)

The first element in the list returned by the XPath is used. If no <titleLocator> element is present, or if no match is found in the document, the default algorithm is used to retrieve the text for the given element.