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-regexpRegular expression matching the name of elements used as headings.
nxml-heading-scan-distanceMaximum distance from section to scan for heading.
nxml-outline-child-indentIndentation in an outline for child element relative to parent element.
nxml-section-element-name-regexpRegular expression matching the name of elements used as sections.

Defined functions (38)

nxml-after-section-start-tag()
nxml-back-to-section-start(&optional INVISIBLE-OK)
nxml-display-section(LAST-POS SECTION-START-POS HEADING-START-POS PARENT-INDENT PARENT-OUTLINE-STATE HAD-CHILDREN TAG-QNAMES)
nxml-end-of-heading()
nxml-get-outline-state(POS)
nxml-heading-start-position()
nxml-hide-all-text-content()
nxml-hide-direct-text-content()
nxml-hide-other()
nxml-hide-subheadings()
nxml-hide-text-content()
nxml-highlighted-qname(QNAME)
nxml-mouse-hide-direct-text-content(EVENT)
nxml-mouse-hide-subheadings(EVENT)
nxml-mouse-set-point(EVENT)
nxml-mouse-show-direct-subheadings(EVENT)
nxml-mouse-show-direct-text-content(EVENT)
nxml-outline-adjust-point()
nxml-outline-display-multi-line-end-tag(LAST-POS START-TAG-INDENT)
nxml-outline-display-rest(OUTLINE-STATE START-TAG-INDENT TAG-QNAMES)
nxml-outline-display-single-line-end-tag(LAST-POS)
nxml-outline-error(&rest ARGS)
nxml-outline-set-overlay(CATEGORY START END &optional FRONT-ADVANCE REAR-ADVANCE)
nxml-refresh-outline()
nxml-report-outline-error(MSG ERR)
nxml-section-start-position()
nxml-section-tag-backward()
nxml-section-tag-forward()
nxml-section-tag-transform-outline-state(STARTP SECTION-START-POS &optional HEADING-START-POS)
nxml-set-outline-state(POS STATE)
nxml-show()
nxml-show-all()
nxml-show-direct-subheadings()
nxml-show-direct-text-content()
nxml-show-subheadings()
nxml-transform-buffer-outline(ALIST)
nxml-transform-outline-state(SECTION-START-POS)
nxml-transform-subtree-outline(ALIST)

Defined faces (4)

nxml-headingFace for the contents of abbreviated heading elements.
nxml-outline-active-indicatorFace for clickable ‘+’ or ‘-’ before element names in outlines.
nxml-outline-ellipsisFace used for ‘...’ in outlines.
nxml-outline-indicatorFace for ‘+’ or ‘-’ before element names in outlines.