informalexample
Prev | DocBook Element Reference | Next

This is an alpha version of this book.

# informalexample

## Name

informalexample — A displayed example without a title

##

# Synopsis

### Content Model

    informalexample ::=
    ((calloutlist|glosslist|itemizedlist|orderedlist|segmentedlist|
      simplelist|variablelist|literallayout|programlisting|
      programlistingco|screen|screenco|screenshot|synopsis|
      cmdsynopsis|funcsynopsis|classsynopsis|fieldsynopsis|
      constructorsynopsis|destructorsynopsis|methodsynopsis|
      formalpara|para|simpara|address|blockquote|graphic|graphicco|
      mediaobject|mediaobjectco|informalequation|informalexample|
      informalfigure|informaltable|indexterm|beginpage)+)

### Attributes

Common attributes

Name | Type | Default
width | CDATA | None

### Parameter Entities

The following parameter entities contain informalexample:

Parameter Entities
`%admon.mix;` | `%bookcomponent.content;` | `%component.mix;`
`%divcomponent.mix;` | `%example.mix;` | `%figure.mix;`
`%footnote.mix;` | `%glossdef.mix;` | `%indexdivcomponent.mix;`
`%informal.class;` | `%para.mix;` | `%qandaset.mix;`
`%refcomponent.mix;` | `%revdescription.mix;` | `%sidebar.mix;`

## Description

`InformalExample` is a wrapper for an example without a title. Examples often contain `ProgramListing`s or other large block elements.

### Processing expectations

Formatted as a displayed block.

### Parents

These elements contain informalexample: `answer`, `appendix`, `article`, `bibliodiv`, `bibliography`, `blockquote`, `callout`, `caution`, `chapter`, `constraintdef`, `example`, `figure`, `footnote`, `glossary`, `glossdef`, `glossdiv`, `important`, `index`, `indexdiv`, `informalexample`, `informalfigure`, `listitem`, `msgexplan`, `msgtext`, `note`, `para`, `partintro`, `preface`, `procedure`, `qandadiv`, `qandaset`, `question`, `refsect1`, `refsect2`, `refsect3`, `refsynopsisdiv`, `revdescription`, `sect1`, `sect2`, `sect3`, `sect4`, `sect5`, `section`, `setindex`, `sidebar`, `simplesect`, `step`, `tip`, `warning`.

### Children

The following elements occur in informalexample: `address`, `beginpage`, `blockquote`, `calloutlist`, `classsynopsis`, `cmdsynopsis`, `constructorsynopsis`, `destructorsynopsis`, `fieldsynopsis`, `formalpara`, `funcsynopsis`, `glosslist`, `graphic`, `graphicco`, `indexterm`, `informalequation`, `informalexample`, `informalfigure`, `informaltable`, `itemizedlist`, `literallayout`, `mediaobject`, `mediaobjectco`, `methodsynopsis`, `orderedlist`, `para`, `programlisting`, `programlistingco`, `screen`, `screenco`, `screenshot`, `segmentedlist`, `simpara`, `simplelist`, `synopsis`, `variablelist`.

## Attributes

width

  `Width` specifies the width (in characters) of the longest line in this `InformalExample` (formatters may use this value to determine scaling or rotation).

## See Also

`equation`, `example`, `figure`, `informalequation`, `informalfigure`, `informaltable`, `table`.

## Examples

    <!DOCTYPE informalexample PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
              "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
    <informalexample>
    <programlisting>
    sub print_content_model {
        my($self) = shift;
        local($_) = shift;
        local(*FILE) = shift;

        my(@cm) = $self->format_content_model2($_);
        foreach $_ (@cm) {
            print FILE $self->make_links($_, 1, 1), "\n";
        }
    }
    </programlisting>
    </informalexample>

    sub print_content_model {
        my($self) = shift;
        local($_) = shift;
        local(*FILE) = shift;

        my(@cm) = $self->format_content_model2($_);
        foreach $_ (@cm) {
            print FILE $self->make_links($_, 1, 1), "\n";
        }
    }

For additional examples, see also `screenco` .

Prev | Home | Next
informalequation | Up | informalfigure

Copyright © 1999, 2000, 2001 O'Reilly & Associates, Inc.