File: nxml-outln.el.html
A section can be in one of three states
1. display normally; this displays each child section
according to its state; anything not part of child sections is also
displayed normally
2. display just the title specially; child sections are not displayed
regardless of their state; anything not part of child sections is
not displayed
3. display the title specially and display child sections
according to their state; anything not part of the child section is
not displayed
The state of a section is determined by the value of the
nxml-outline-state text property of the < character that starts
the section.
For state 1 the value is nil or absent.
For state 2 it is the symbol hide-children.
For state 3 it is t.
The special display is achieved by using overlays. The overlays
are computed from the nxml-outline-state property by
nxml-refresh-outline. There overlays all have a category property
with an nxml-outline-display property with value t.
For a section to be recognized as such, the following conditions must
be satisfied:
- its start-tag must occur at the start of a line (possibly indented)
- its local name must match nxml-section-element-name-regexp
- it must have a heading element; a heading element is an
element whose name matches nxml-heading-element-name-regexp,
and that occurs as, or as a descendant of, the first child element
of the section
XXX What happens if an nxml-outline-state property is attached to a character that doesn't start a section element?
An outlined section (an section with a non-nil nxml-outline-state
property) can be displayed in either single-line or multi-line
form. Single-line form is used when the outline state is hide-children
or there are no child sections; multi-line form is used otherwise.
There are two flavors of single-line form: with children and without.
The with-children flavor is used when there are child sections.
Single line with children looks like
<+section>A section title...</>
Single line without children looks like
<-section>A section title...</>
Multi line looks likes
<-section>A section title...
[child sections displayed here]
</-section>
The indent of an outlined section is computed relative to the
outermost containing outlined element. The indent of the
outermost containing element comes from the non-outlined
indent of the section start-tag.
Defined variables (4)
nxml-heading-element-name-regexp | Regular expression matching the name of elements used as headings. |
nxml-heading-scan-distance | Maximum distance from section to scan for heading. |
nxml-outline-child-indent | Indentation in an outline for child element relative to parent element. |
nxml-section-element-name-regexp | Regular expression matching the name of elements used as sections. |
Defined functions (38)
Defined faces (4)
nxml-heading | Face for the contents of abbreviated heading elements. |
nxml-outline-active-indicator | Face for clickable ‘+’ or ‘-’ before element names in outlines. |
nxml-outline-ellipsis | Face used for ‘...’ in outlines. |
nxml-outline-indicator | Face for ‘+’ or ‘-’ before element names in outlines. |