EclipseXSLT - XSLT Support for Eclipse » Usage » Editor Outline
Editor OutlineLaunch Configuration

4.2.1.  Outline Configuration

Orangevolt EclipseXSLT provides a configurable outline depending on your document type/structure.

The outline configuration defines labels and images for all document elements which should be outlined. Labels can be defined using XPath expression placeholders to allow label creation based on the real document content.

An The dynamic label creation facility allows you to label an <chapter> element with attribute title as Chapter ${@title}. Alternative label expressions are possible by separator |. All <chapter> elements will now be labeled with Chapter [content of title attribute].
Elements not defined in the configuration will be hidden in the outline.

Outline configurations are read when at first use. The default outline configuration provides 3 configurations : the xml document type which is the source of this documentation , XSLT stylesheet outline and Docbook outline.

Outline configurations are done by Eclipse extension points. The best way for defining an outline is to create a new Eclipse fragment (see the Docbook fragment source as an example. It is located in [eclipse]/plugins/com.orangevolt.eclipse.xslt.docbook/). The outline icons can also be located in your fragment.

Format specification

Below is the outline configuration for Docbook files:

outline configuration fragment for docbook (com.orangevolt.eclipse.xslt.docbook/fragment.xml)
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
  <extension point="com.orangevolt.eclipse.xslt.outlineconfiguration">
      name="Orangevolt DocBook Outline Configuration"
      <element name="book" label="${title}|${@label}|${@xreflabel}|${@id}" icon="icons/outline/docbook/cong-docbook-book-16.png"/>
10        <element name="part" label="${title}|${@label}|${@xreflabel}|${@id}" icon="icons/outline/docbook/cong-docbook-book-16.png"/>
11        <element name="article" label="${title}|${articleinfo/title}|${@xreflabel}|${@id}" icon="icons/outline/docbook/cong-docbook-article-16.png"/>
12        <element name="preface" label="${title}|${@xreflabel}|${@id}|Preface" icon="icons/outline/docbook/cong-subsection-16.png"/>
13        <element name="chapter" label="${title}|${@label}|${@xreflabel}|${@id}" icon="icons/outline/docbook/cong-subsection-16.png"/>
14        <element name="appendix" label="${title}|${@label}|${@xreflabel}|${@id}" icon="icons/outline/docbook/cong-summary-16.png"/>
15        <element name="glossary" label="${title}|${@xreflabel}|${@id}" icon="icons/outline/docbook/cong-summary-16.png"/>
16        <element name="section" label="${title}|${@label}|${@xreflabel}|${@id}" icon="icons/outline/docbook/cong-subsection-16.png"/>
17        <element name="simplesect" label="${title}|${@xreflabel}|@id}" icon="icons/outline/docbook/cong-subsection-16.png"/>
18        <element name="sect1" label="${title}|${@label}|${@xreflabel}|${@id}" icon="icons/outline/docbook/cong-subsection-16.png"/>
19        <element name="sect2" label="${title}|${@label}|${@xreflabel}|${@id}" icon="icons/outline/docbook/cong-subsection-16.png"/>
20        <element name="sect3" label="${title}|${@label}|${@xreflabel}|${@id}" icon="icons/outline/docbook/cong-subsection-16.png"/>
21        <element name="sect4" label="${title}|${@label}|${@xreflabel}|${@id}" icon="icons/outline/docbook/cong-subsection-16.png"/>
22        <element name="sect5" label="${title}|${@label}|${@xreflabel}|${@id}" icon="icons/outline/docbook/cong-subsection-16.png"/>
23        <element name="index" label="${title}|${@xreflabel}|${@id}" icon="icons/outline/docbook/cong-subsection-16.png"/>
24      </grammar>
25    </extension>
26  </fragment>

As you can see in the configuration an outline is defined as an extension to EclipseXSLT extension point com.orangevolt.eclipse.xslt.outlineconfiguration.

You can define multiple outline configurations within the extension point. I suggest to create one single fragment (for you or your company) containing all custom outline configurations.

For big outline definitions which are common used (like the Docbook outline configuration) i suggest its own fragment named by the format spec.

An outline configuration starts with the grammar element. grammar accepts the following attributes:

Inside the grammar element are element tags defined. Each element is used to describe one single xml element from the customized xml outline. element takes the following attributes: