qandaset
Prev | DocBook Element Reference | Next

This is an alpha version of this book.

# qandaset

## Name

qandaset — A question-and-answer set

##

# Synopsis

### Content Model

    qandaset ::=
    ((title,titleabbrev?)?,
     (calloutlist|glosslist|itemizedlist|orderedlist|segmentedlist|
      simplelist|variablelist|caution|important|note|tip|warning|
      literallayout|programlisting|programlistingco|screen|screenco|
      screenshot|synopsis|cmdsynopsis|funcsynopsis|classsynopsis|
      fieldsynopsis|constructorsynopsis|destructorsynopsis|
      methodsynopsis|formalpara|para|simpara|address|blockquote|
      graphic|graphicco|mediaobject|mediaobjectco|informalequation|
      informalexample|informalfigure|informaltable|equation|example|
      figure|table|procedure|anchor|bridgehead|remark|highlights|
      indexterm)*,
     (qandadiv+|qandaentry+))

### Attributes

Common attributes

Name | Type | Default
defaultlabel | Enumeration:
none
number
qanda
| None

### Parameter Entities

The following parameter entities contain qandaset:

Parameter Entities
`%bookcomponent.content;` | `%component.mix;` | `%compound.class;`
`%divcomponent.mix;` | `%refcomponent.mix;` |

## Description

A `QandASet` is a list consisting of `Question`s and `Answer`s. `QandASet`s can be divided into sections.

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

Common uses for `QandASet`s 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 `Question`s and `Answer`s.

### 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`, `caution`, `classsynopsis`, `cmdsynopsis`, `constructorsynopsis`, `destructorsynopsis`, `equation`, `example`, `fieldsynopsis`, `figure`, `formalpara`, `funcsynopsis`, `glosslist`, `graphic`, `graphicco`, `highlights`, `important`, `indexterm`, `informalequation`, `informalexample`, `informalfigure`, `informaltable`, `itemizedlist`, `literallayout`, `mediaobject`, `mediaobjectco`, `methodsynopsis`, `note`, `orderedlist`, `para`, `procedure`, `programlisting`, `programlistingco`, `qandadiv`, `qandaentry`, `remark`, `screen`, `screenco`, `screenshot`, `segmentedlist`, `simpara`, `simplelist`, `synopsis`, `table`, `tip`, `title`, `titleabbrev`, `variablelist`, `warning`.

## Attributes

defaultlabel

  `DefaultLabel` identifies the default label that should be used for `Question`s and `Answer`s:

  `qanda`

    `Question`s are labeled ‘Q:’ and `Answer`s 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` element on each `Question` and `Answer` is used.

  `none`

    No distinguishing label precedes `Question`s or `Answer`s.

  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 XML V4.1.2//EN"
              "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
    <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 XML V4.1.2//EN"
              "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
    <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>

    <qandaentry><question><para>Agfa, Inc.</para></question>
    <answer><para>...</para></answer>
    </qandaentry>

    </qandadiv>
    </qandadiv>
    </qandaset>
    </article>

Prev | Home | Next
qandaentry | Up | question

Copyright © 1999, 2000, 2001 O'Reilly & Associates, Inc.