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:
qandaQuestions are marked with F: and answers with A:. These letters are replaced by their localized equivalents according to the configured language.
numberEntries are numbered in the manner specified by the stylesheets.
noneQuestion and answer elements are not distinguished.
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de