XML technologies / DocBook / Block elements / FAQs

(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)

The element qandaset is a specialized list for marking up questions and answers ( FAQs — Frequently Asked Questions). It can be structured using qandadiv. Each qandaset must have a question (question) with zero or more answers (answer).

Example: Questions and answers (FAQs)

<qandaset defaultlabel="qanda">
 <qandadiv>
   <title>Fragen zu XML</title>
   <para>Einführender Absatz...</para>
   <qandaentry>
     <question><para>Was ist XML?</para></question>
     <answer><para>XML ist ...</para></answer>
   </qandaentry>
   <qandaentry>
     <question><para>Was ist eine DTD?</para></question>
     <answer><para>Eine DTD ist ...</para></answer>
   </qandaentry>
 </qandadiv>
</qandaset>

Line 2: Optional element for grouping questions
Line 5: Question-and-answer entry, grouping a question and its possible answers.
Line 6: Question; this element is required.
Line 7: Answer; a question can have zero or more answers.

Result:

Fragen zu XML

Einführender Absatz...

F: Was ist XML?

A: XML ist ...

F: Was ist eine DTD?

A: Eine DTD ist ... 

FAQ rendering depends on the stylesheets and the attribute defaultlabel. It can have the following values:

qanda

Questions are marked with F: and answers with A:. These letters are replaced by their localized equivalents according to the configured language.

number

Entries are numbered in the manner specified by the stylesheets.

none

Question and answer elements are not distinguished.

  

back to top