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

QandASet -- A question-and-answer set

Synopsis

Content Model

QandASet ::= ((Title,TitleAbbrev?)?,  (CalloutList|GlossList|ItemizedList|OrderedList|SegmentedList|   SimpleList|VariableList|LiteralLayout|ProgramListing|   ProgramListingCO|Screen|ScreenCO|ScreenShot|Synopsis|   CmdSynopsis|FuncSynopsis|FormalPara|Para|SimPara|Address|   BlockQuote|Graphic|GraphicCO|MediaObject|MediaObjectCO|   InformalEquation|InformalExample|InformalFigure|InformalTable|   Equation|Example|Figure|Table|Procedure|Anchor|BridgeHead|   Comment|Highlights|IndexTerm)*,  (QandADiv+|QandAEntry+))

Attributes

Common attributes

Name

Type

Default

DefaultLabel

Enumeration:

none
number
qanda

None

Tag Minimization

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

Parameter Entities

%bookcomponent.content;%component.mix;%compound.class;
%divcomponent.mix;%refcomponent.mix;

Description

A QandASet is a list consisting of Questions and Answers. QandASets can be divided into sections.

Every entry in a QandASet must contain a Question, but Answers are optional (some questions have no answers), and may be repeated (some questions have more than one answer).

Common uses for QandASets include reader questionnaires and lists of "Frequently Asked Questions" (FAQs). For the purpose of an FAQ, DocBook V3.1 added the FAQ class to Article.

Processing expectations

Formatted as a displayed block. The DefaultLabel attribute has a significant influence on the presentation of Questions and Answers.

Parents

These elements contain QandASet: Appendix, Article, BiblioDiv, Bibliography, BlockQuote, Callout, Chapter, Glossary, GlossDiv, Index, ListItem, MsgExplan, MsgText, PartIntro, Preface, Procedure, RefSect1, RefSect2, RefSect3, RefSynopsisDiv, Sect1, Sect2, Sect3, Sect4, Sect5, Section, SetIndex, SimpleSect, Step.

Children

The following elements occur in QandASet: Address, Anchor, BlockQuote, BridgeHead, CalloutList, CmdSynopsis, Comment, Equation, Example, Figure, FormalPara, FuncSynopsis, GlossList, Graphic, GraphicCO, Highlights, IndexTerm, InformalEquation, InformalExample, InformalFigure, InformalTable, ItemizedList, LiteralLayout, MediaObject, MediaObjectCO, OrderedList, Para, Procedure, ProgramListing, ProgramListingCO, QandADiv, QandAEntry, Screen, ScreenCO, ScreenShot, SegmentedList, SimPara, SimpleList, Synopsis, Table, Title, TitleAbbrev, VariableList.

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

In some contexts, the following elements are excluded: Equation, Example, Figure, IndexTerm, InformalTable, Table.

Attributes

DefaultLabel

DefaultLabelIdentifies the default label that should be used for Questions and Answers:

qanda

Questions are labeled "Q:" and Answers are labeled "A:". Other similar labels may be substituted, for example, the words might be spelled out, "Question:" and "Answer:", and the actual characters or words used are dependent on the language.

number

The entries are enumerated.

label

The content of the Label attribute on each Question and Answer is used.

none

No distinguishing label precedes Questions or Answers.

If no value is specified, the implied presentation may be any one of these, as defined by the stylesheet.

Examples

<!DOCTYPE qandaset PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <qandaset defaultlabel='qanda'> <qandaentry> <question> <para> To be, or not to be? </para> </question> <answer> <para> That is the question. </para> </answer> </qandaentry> </qandaset>

Q: To be, or not to be?

Q: To be, or not to be?

A: That is the question.

<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <article class=faq> <title>Frequently Asked Questions About Fonts</title> <para>...</para> <qandaset> <qandadiv><title>General Information</title> <para>...</para> <qandadiv><title>Font Houses</title> <qandaentry><question><para>Adobe Systems, Inc.</para></question> <answer><para>...</para></answer> <qandaentry><question><para>Agfa, Inc.</para></question> <answer><para>...</para></answer> </qandadiv> </qandadiv> </qandaset> </article>


PrevHomeNext
QandAEntryUpQuestion

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