Shaun McCance
shaunm@gnome.org 2008-2009
Mark a group of block elements as being part of a single example.

# Ejemplos

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

      mal_block +
    }

Use the `example` element to place block elements into a logical group, indicating that they are part of a single example. This may be used to group example input with its result, to show different steps with different types of block elements, or simply to group some paragraphs together.

# Notas

The `example` element can contain any general block content.

The `example` 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 `example` element can have attributes from external namespaces. See for more information on external-namespace attributes.

# Ejemplos

Use `example` to show how to use the `screen` element, grouping the input and formatted result:

<example> <code><![CDATA[ <screen> xsltproc -o mal_block_screen.html \ --stringparam mal.cache.file `pwd`/mallard.cache \ `pkg-config --variable mal2html gnome-doc-utils` \ mal_block_screen.html </screen> ]]></code> <screen> xsltproc -o mal_block_screen.html \ --stringparam mal.cache.file `pwd`/mallard.cache \ `pkg-config --variable mal2html gnome-doc-utils` \ mal_block_screen.html </screen> </example>
<screen> xsltproc -o mal_block_screen.html \ --stringparam mal.cache.file `pwd`/mallard.cache \ `pkg-config --variable mal2html gnome-doc-utils` \ mal_block_screen.html </screen>

    xsltproc -o mal_block_screen.html \
      --stringparam mal.cache.file `pwd`/mallard.cache \
      `pkg-config --variable mal2html gnome-doc-utils` \
      mal_block_screen.html

# Processing Expectations

The contents of an `example` element should each be rendered as block elements as normal. Example should use margins, borders, or other stylistic effects to provide a clear visual indication of the grouping.

# Comparison to Other Formats

The `example` element is similar to the `example` element in DocBook. In DocBook, the `example` element is a formal element. In Mallard, `example` is a simple container element, and does not allow a `title` element.