Shaun McCance
shaunm@gnome.org 2008-2009
Provide a name and description for a code block or other content.

# Listen

    mal_block_listing = element listing {
      attribute style { xsd:NMTOKENS } ?,
      attribute * - (mal:* | local:*) { text } *,

      mal_block_title ?,
      mal_block_desc ?,
      mal_block +
    }

Use the `listing` element to create named listing of file contents or other content. Listings are usually used with code blocks to provide a name for the file to enter the content into. They may also be used to provide a name for an interactive shell session or any other type of content. To provide a title for images or other multimedia objects, use the figure element.

# Anmerkungen

The `listing` element contains an optional title element, an optional desc element, and any general block content.

The `listing` element can occur in any general block context, including inside pages, sections, and certain block elements.

The `style` attribute takes a space-separated list of style hints. Processing tools should adjust their behavior according to those style hints they understand.

The `listing` element can have attributes from external namespaces. See for more information on external-namespace attributes.

# Beispiele

Use `listing` to provide a file name and description for a code block:

<listing> <title><file>index.page</file></title> <desc>A first Mallard page</desc> <code><![CDATA[ <page xmlns="http://projectmallard.org/1.0/" type="guide" id="index"> <!-- Content goes here --> </page>]]></code> </listing>

## index.page

Eine erste Mallard-Seite
<page xmlns="http://projectmallard.org/1.0/" type="guide" id="index"> <!-- Content goes here --> </page>

# Processing Expectations

Listings are displayed as block elements, with each of their child elements being interpreted as block elements. When present, the title and description should be displayed in a way that makes their respective roles clear.