◇◆
<programlisting> Program Listing
A verbatim environment for program source code or pseudo-code.
Usage/Remarks
Authoring Note
The authoring model does not permit use of @xml:id and @xreflabel with this element. Use is available in the production model, but only then for backwards-compatibility
should prior proceedings years’ production be necessary. (Model versions, predating
2010, permitted @xreflabel’s use with this element.)
Display/Formatting Note
This element’s contents will display in monofont, as boxed text. Spacing and linebreaks
will be preserved. Care should be taken regarding line length to ensure proper display;
longer lines will wrap, with the wrapped text beginning at the left margin.
Models and Context
May be contained in
Description
Any combination of:
- Text, numbers, or special characters
- <emphasis> Emphasis
- <phrase> Phrase
- <superscript> Superscript
- <subscript> Subscript
Expanded Content Model
(#PCDATA | emphasis | phrase | superscript | subscript)*
Tagged Sample
XML document fragment
...
<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 language="XML">
<teiHeader>
<fileDesc>
<titleStmt>
<title>Farming in the New World</title>
...
</titleStmt>
</fileDesc>
</teiHeader></programlisting>
Notice the paired Tags: <code><title></code> and <code></title></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 explicitly empty)</para>
</listitem>
</varlistentry>
</variablelist>
</para>
...