<programlisting>

Program Listing

A verbatim environment for a program source, which is also used, in the Balisage environment, for SGML and XML documents or document fragments.

Remarks

This element’s content is typically displayed or printed in a monofont to preserve character alignment.

Attributes

continuation Numbering Continuation
linenumbering Line Numbering
startinglinenumber Starting Line Number
xml:id XML Unique Identifier
xml:space Space
xreflabel Cross-Reference Label

Related Elements

The <programlisting> element is used for block displays of code, for example, entire programs, in which whitespace (such as tabs, line feeds, and spaces) should be preserved. Computer code (or markup fragments) to be interspersed with text should be tagged with the <code>.

Model Description

Any combination of:

This element may be contained in:

<appendix>, <blockquote>, <figure>, <listitem>, <note>, <para>, <section>, <td>, <th>

Example

         
...
<para>Information processing, especially text markup, was primitive in the colony.
For example, most text stores were in XML! Documents may have looked like this:
<programlisting>
   &lt;teiHeader&gt;
      &lt;fileDesc&gt;
         &lt;titleStmt&gt;
            &lt;title&gt;Farming in the New World&lt;/title&gt;
      ...
        &lt;/titleStmt&gt;
      &lt;/fileDesc&gt;
  &lt;/teiHeader&gt;
</programlisting>
Notice the paired Tags: <code>&lt;title&gt;</code> and <code>&lt;/title&gt;</code>
and the primitive use of indenting. Unusual features of the colonists data
processing practices included:
<variablelist>
<varlistentry>
<term>Tags</term>
<listitem><para>Meaningful descriptions of the information enclosed by the
markers</para></listitem>
</varlistentry>
<varlistentry>
<term>Balance</term>
<listitem><para>All markup is both opened and closed (or explicitely
empty)</para></listitem>
</varlistentry>
</variablelist>
</para>
...


        

Module

balisage-1-1