DocBook: The Definitive Guide

docbook: the definitive guide
By Norman Walsh & Leonard Muellner
1st Edition October 1999
1-56592-580-7, Order Number: 5807
652 pages, $36.95 , Includes CD-ROM

DocBook: The Definitive Guide
PrevNext

Name

ProgramListingCO -- A program listing with associated areas used in callouts

Synopsis

Content Model

ProgramListingCO ::= (AreaSpec,ProgramListing,CalloutList*)

Attributes

Common attributes

Tag Minimization

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

Parameter Entities

%admon.mix;%bookcomponent.content;%component.mix;
%divcomponent.mix;%example.mix;%figure.mix;
%footnote.mix;%glossdef.mix;%indexdivcomponent.mix;
%legalnotice.mix;%linespecific.class;%para.mix;
%qandaset.mix;%refcomponent.mix;%sidebar.mix;
%tabentry.mix;%tbl.entry.mdl;%textobject.mix;

Description

Callouts, such as numbered bullets, are an annotation mechanism. In an online system, these bullets are frequently "hot," and clicking on them sends you to the corresponding annotation.

A ProgramListingCO is a wrapper around an AreaSpec and a ProgramListing. An AreaSpec identifies the locations (coordinates) in the ProgramListing where the callouts occur. The ProgramListingCO may also contain the list of annotations in a CalloutList, although the CalloutList may also occur outside of the wrapper, elsewhere in the document.

It is also possible to embed CO elements directly in the verbatim text, in order to avoid having to calculate the correct coordinates. If you decided to go this route, use a ProgramListing and a CalloutList without the ProgramListingCO wrapper. A ProgramListingCO must specify at least one coordinate.

For a complete description of callouts, see Callout.

Processing expectations

Formatted as a displayed block. This element is displayed "verbatim"; whitespace and linebreaks within this element are significant.

The mandatory processing expectations of a ProgramListingCO are minimal: a system is expected to render the program listing and the callout list, if present.

If explicit CO elements are embedded in a ProgramListing, they must generate appropriate callout marks.

In online environments, the processing system may be able to instantiate the linking relationships between the callout marks in the program listing and the annotations. Some systems may even be able to go a step further and generate the callout marks automatically from the coordinate information, but this level of sophistication is not mandatory.

Parents

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

Children

The following elements occur in ProgramListingCO: AreaSpec, CalloutList, ProgramListing.

In some contexts, the following elements are allowed anywhere: BeginPage, IndexTerm.

See Also

AreaSpec, CalloutList, CO, GraphicCO, ImageObjectCO, MediaObjectCO, ScreenCO

Examples

<!DOCTYPE programlistingco PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <programlistingco> <areaspec> <areaset  coords="">   <area  coords=4>   <area  coords=8> </areaset> <area  coords=12> <area  coords=12> </areaspec> <programlisting> sub do_nothing_useful {     my($a, $b, $c);     $a = new A;          $a->does_nothing_either();     $b = new B;      $c = "frog";     return ($a, $c); } </programlisting> <calloutlist> <callout arearefs="ex.plco.const"> <para> These are calls to the constructor <function>new</function> in the object classes. </para> </callout> <callout arearefs="ex.plco.ret"> <para> This function returns a two-element list. </para> </callout> <callout arearefs="ex.plco.dest"> <para> The <emphasis>destructor</emphasis> (<function>DESTROY</function>) for the object <literal>$b</literal> will be called automatically for this object since there can be no other references to it outside this function. </para> </callout> </calloutlist> </programlistingco>

sub do_nothing_useful {     my($a, $b, $c);     $a = new A;                                            (1)          $a->does_nothing_either();     $b = new B;                                            (1)     $c = "frog";     return ($a, $c);                                       (2)                                       (3) }

(1)
These are calls to the constructor new in the object classes.
(2)
This function returns a two-element list.
(3)
The destructor (DESTROY) for the object $b will be called automatically for this object since there can be no other references to it outside this function.


PrevHomeNext
ProgramListingUpPrompt

Back to: DocBook: The Definitive Guide


O'Reilly Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts
International | About O'Reilly | Affiliated Companies

© 1999, O'Reilly & Associates, Inc.



DocBook. The Definitive Guide
DocBook 5: The Definitive Guide
ISBN: 0596805020
EAN: 2147483647
Year: 1999
Pages: 412
Authors: Walsh Norman, Richard L. Hamilton
BUY ON AMAZON

Similar book on Amazon
DocBook XSL: The Complete Guide (4th Edition)
DocBook XSL: The Complete Guide (4th Edition)
XSLT, 2nd Edition
XSLT, 2nd Edition
XSLT Cookbook: Solutions and Examples for XML and XSLT Developers, 2nd Edition
XSLT Cookbook: Solutions and Examples for XML and XSLT Developers, 2nd Edition
XML: Visual QuickStart Guide (2nd Edition)
XML: Visual QuickStart Guide (2nd Edition)

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net