Reference. Reference for the DocBook DTD

[Prev] [Next]


ProgramListing

Name

ProgramListing---Listing of all or part of a program

Synopsis

Content Model
  (CO | LineAnnotation | #PCDATA | FootnoteRef | XRef | Abbrev
  | Acronym | Citation | CiteRefEntry | CiteTitle | Emphasis
  | FirstTerm | ForeignPhrase | GlossTerm | Footnote | Phrase
  | Quote | Trademark | WordAsWord | Link | OLink | ULink
  | Action | Application | ClassName | Command
  | ComputerOutput | Database | Email | EnVar | ErrorCode
  | ErrorName | ErrorType | Filename | Function | GUIButton
  | GUIIcon | GUILabel | GUIMenu | GUIMenuItem | GUISubmenu
  | Hardware | Interface | InterfaceDefinition | KeyCap
  | KeyCode | KeyCombo | KeySym | Literal | Markup | MediaLabel
  | MenuChoice | MouseButton | MsgText | Option | Optional
  | Parameter | Prompt | Property | Replaceable | ReturnValue
  | SGMLTag | StructField | StructName | Symbol | SystemItem
  | Token | Type | UserInput | Anchor | Author | AuthorInitials
  | CorpAuthor | ModeSpec | OtherCredit | ProductName
  | ProductNumber | RevHistory | Comment | Subscript
  | Superscript | InlineGraphic | InlineEquation | Synopsis
  | CmdSynopsis
  | FuncSynopsis)+

Attributes

This element has common and Role attributes.

Name Value(s) Type Default Value
Format (linespecific) NOTATION linespecific
Width NUMBER #IMPLIED  

Tag Minimization

Both the start- and end-tags are required for this element.

Description

Listing of all or part of a program. Line breaks and leading white space are significant in a ProgramListing, which may contain in-line elements, including LineAnnotations. (LineAnnotations are a document author's comments on the code, not the comments written into the code itself by the code's author.) ProgramListing has common and Width attributes.

Parents

These elements contain ProgramListing: Appendix, Article, BiblioDiv, Bibliography, BlockQuote, Callout, Caution, Chapter, Dedication, Example, Figure, Footnote, GlossDef, GlossDiv, Glossary, Important, Index, IndexDiv, InformalExample, LegalNotice, ListItem, MsgExplan, MsgText, Note, Para, PartIntro, Preface, Procedure, ProgramListingCO, RefSect1, RefSect2, RefSect3, RefSynopsisDiv, Sect1, Sect2, Sect3, Sect4, Sect5, SetIndex, Sidebar, SimpleSect, Step, Tip, Warning, and entry.

Children

ProgramListing contains these elements: Abbrev, Acronym, Action, Anchor, Application, Author, AuthorInitials, CO, Citation, CiteRefEntry, CiteTitle, ClassName, CmdSynopsis, Command, Comment, ComputerOutput, CorpAuthor, Database, Email, Emphasis, EnVar, ErrorCode, ErrorName, ErrorType, Filename, FirstTerm, Footnote, FootnoteRef, ForeignPhrase, FuncSynopsis, Function, GUIButton, GUIIcon, GUILabel, GUIMenu, GUIMenuItem, GUISubmenu, GlossTerm, Hardware, InlineEquation, InlineGraphic, Interface, InterfaceDefinition, KeyCap, KeyCode, KeyCombo, KeySym, LineAnnotation, Link, Literal, Markup, MediaLabel, MenuChoice, ModeSpec, MouseButton, MsgText, OLink, Option, Optional, OtherCredit, #PCDATA, Parameter, Phrase, ProductName, ProductNumber, Prompt, Property, Quote, Replaceable, ReturnValue, RevHistory, SGMLTag, StructField, StructName, Subscript, Superscript, Symbol, Synopsis, SystemItem, Token, Trademark, Type, ULink, UserInput, WordAsWord, and XRef.

In some contexts, additional elements may be allowed by inclusions in parent elements. Similarly, in some contexts, some of these elements may be invalid due to exclusions in parent elements.

Attributes

Width

Width indicates the width of the longest line in the element to which it pertains, in number of characters.

Format

Line ends and leading white space must be preserved in output.

Examples

<PROGRAMLISTINGCO>
<AREASPEC UNITS="LINECOLUMN">
<AREA ID="sco123" COORDS="1 1">
<AREA ID="sco124" COORDS="6 9">
</AREASPEC>
<PROGRAMLISTING>
<SYSTEMITEM CLASS="PROMPT">%</SYSTEMITEM> <USERINPUT>make install</USERINPUT>
install -c -m 0644 rgb.txt /usr/lib/X11
install -c -m 0644 rgb.dir /usr/lib/X11
install -c -m 0644 rgb.pag /usr/lib/X11
install -c -s showrgb /usr/lib/X11
install in ./rgb done
</PROGRAMLISTING>
<CALLOUTLIST>
<TITLE>Comments on the Screen Shown Above</TITLE>
<CALLOUT AREAREFS="sco123">
<PARA>Note % prompt.</PARA>
</CALLOUT>
<CALLOUT AREAREFS="sco124">
<PARA>Note use of install without flag.
</PARA>
</CALLOUT>
</CALLOUTLIST>
</PROGRAMLISTINGCO>


[Prev] ProgramListingCO
[Next] Prompt
[Reference Home] [Davenport Group Home]