Inline Elements

Mallard provides a small but rich set of semantic inline elements. The elements provided are culled from first-hand experience with software documentation and other document formats. The inline elements defined in this specification will serve most software documentation writers’ needs well.

Authors, editors, or other content producers sometimes need to supply richer information in their documents. While this information may not be conveyed by display tools, it may be used for various internal tracking purposes. Mallard allows elements to be extended with attributes from external namespaces. See External Namespaces for more information.

Furthermore, Mallard allows elements from external namespaces to be used in any inline context. See Inline Processing Expectations below for more information.

Processing Expectations

Inline elements occur within block elements or other inline elements. Mallard never allows block elements within inline elements. Inline elements should never introduce a line break in the rendered output.

Different inline elements may introduce different styling effects, such as font variations, text and background colors, and backgrounds. Generally, if a styling effect is set for a particular element, it is in effect for all descendant elements, unless explicitly overridden.

Mallard allows elements from external namespaces to be used in any inline context. Processing tools may have special behavior for particular elements they understand. Otherwise, an unknown inline element should be processed as if it were replaced by its child content.

Schema

The formal definition of the Mallard language is maintained in RELAX NG Compact Syntax in code blocks within this specification. This is the formal definition for the inline content model. The namespace declarations for this definition are on the page Pages.

mal_inline = (
  mal_inline_app * &
  mal_inline_cmd * &
  mal_inline_code * &
  mal_inline_em * &
  mal_inline_file * &
  mal_inline_gui * &
  mal_inline_guiseq * &
  mal_inline_input * &
  mal_inline_key * &
  mal_inline_keyseq * &
  mal_inline_link * &
  mal_inline_media * &
  mal_inline_output * &
  mal_inline_span * &
  mal_inline_sys * &
  mal_inline_var * &
  element * - (mal:* | local:*) {
    attribute * { text } *,
    mal_inline
  } * &
  text ?
)
mal_inline_attr = empty