<refentry id="qandaset.element" revision='3.1'>
<?dbhtml filename="qandaset.html"?>
<refentryinfo>
<pubdate>$Date$</pubdate>
<releaseinfo>$Revision$</releaseinfo>
</refentryinfo>

<refmeta>
<indexterm><primary>elements</primary>
<secondary>qandaset</secondary></indexterm>
<refentrytitle>qandaset</refentrytitle>
<refmiscinfo>Element</refmiscinfo>
</refmeta>
<refnamediv>
<refname>qandaset</refname>
<refpurpose>&qandaset.purpose;</refpurpose>
</refnamediv>

&qandaset.synopsis.gen;
<refsect1 condition='ref.description'><title>Description</title>

<para>A <sgmltag>QandASet</sgmltag> is a list consisting of
<sgmltag>Question</sgmltag>s and <sgmltag>Answer</sgmltag>s.
<sgmltag>QandASet</sgmltag>s can be divided into sections.
</para>

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

<para>Common uses for <sgmltag>QandASet</sgmltag>s include reader
questionnaires and lists of <quote>Frequently Asked Questions</quote>
(<acronym>FAQ</acronym>s). For the purpose of an
<acronym>FAQ</acronym>, DocBook <acronym>V3.1</acronym> added the
<literal>FAQ</literal> class to <sgmltag>Article</sgmltag>.
</para>

<refsect2><title>Processing expectations</title>
<para>&format.block; The <sgmltag class='attribute'>DefaultLabel</sgmltag>
attribute has a significant influence on the presentation of
<sgmltag>Question</sgmltag>s and <sgmltag>Answer</sgmltag>s.
</para>
</refsect2>

&qandaset.parents.gen;
&qandaset.children.gen;

</refsect1>
<refsect1 condition='ref.elem.attrdesc'><title>Attributes</title>
<variablelist>
<varlistentry><term>defaultlabel</term>
<listitem>
<para><sgmltag class="attribute">DefaultLabel</sgmltag> identifies the
default label that should be used for <sgmltag>Question</sgmltag>s and
<sgmltag>Answer</sgmltag>s:</para>

<variablelist>
<varlistentry><term><literal>qanda</literal></term>
<listitem>
<para><sgmltag>Question</sgmltag>s are labeled <quote>Q:</quote> and
<sgmltag>Answer</sgmltag>s are labeled <quote>A:</quote>. Other
similar labels may be substituted, for example, the words might be
spelled out, <quote>Question:</quote> and <quote>Answer:</quote>, and
the actual characters or words used are dependent on the language.
</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>number</literal></term>
<listitem><para>
The entries are enumerated.
</para></listitem>
</varlistentry>
<varlistentry><term><literal>none</literal></term>
<listitem><para>
No distinguishing label precedes <sgmltag>Question</sgmltag>s or
<sgmltag>Answer</sgmltag>s.
</para></listitem>
</varlistentry>
</variablelist>

<para>If no value is specified, the implied presentation may be any one of these,
as defined by the stylesheet. Note that each question and answer can explicitly
define a label, regardless of the default label specified.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1><title>Examples</title>

<informalexample role="example-source">
<programlisting>&qandaset.example.1.txt;</programlisting>
</informalexample>

<anchor id="ex.os.qandaset.1" role="HACK-ex.out.start"/>
&qandaset.example.1.gen;
<anchor id="ex.oe.qandaset.1" role="HACK-ex.out.end"/>

<informalexample role="example-source">
<programlisting>&qandaset.example.2.txt;</programlisting>
</informalexample>

&qandaset.example.seealso.gen;
</refsect1>
</refentry>

