<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="akffaq-logo.xsl"?>
<!DOCTYPE akffaq SYSTEM "./akffaq.dtd"
[
<!ENTITY smiley      "&#x263A;">
<!ENTITY frowney     "&#x2639;">
<!ENTITY nbsp        "&#x00A0;">
<!ENTITY mdash       "&#x2014;">
<!ENTITY FAQ         
  "<acronym title='Frequently Asked Questions'>FAQ</acronym>">
<!ENTITY XML
  "<acronym title='eXtensible Markup Language'>XML</acronym>">
<!ENTITY HTML
  "<acronym title='HyperText Markup Language'>HTML</acronym>">
<!ENTITY UTF
  "<acronym title='Unicode Transformation Format'>UTF</acronym>">
<!ENTITY BOM
  "<acronym title='Byte Order Mark'>BOM</acronym>">
]>

<akffaq xml:lang="en" 
        description="AKFFAQ is a generator for FAQs"
        author="Andreas K. Förster">

<heading>AKFFAQ-&FAQ;</heading>

<overview back="back to the overview"/>

<section id="general" title="general questions">

<question id="akffaq">
What is AKFFAQ?
</question>

<answer><p>
AKFFAQ is an easy &XML;-based language for writing &FAQ;s
(<quote>Frequently Asked Questions</quote>).
</p></answer>

<question id="faq">
What is a &FAQ;?
</question>

<answer><p>
&FAQ; stands for <quote>Frequently Asked Questions</quote>.
Whether these questions are really frequently asked is another topic.
Some people like me simply like this style of writing.
</p></answer>

<question id="other_uses">
What else could AKFFAQ be used for?
</question>

<answer><p>
AKFFAQ can be used for anything where there are questions or claims and 
answers for them. For example also for interviews, or for debunking myths.
</p></answer>

<question id="status">
What is the current status of AKFFAQ?
</question>

<answer>
<p>Alpha &mdash;
That means it is still under developement and the definition may still 
change.
</p>
</answer>

<question id="website">
What is the official website for AKFFAQ?
</question>

<answer><p>
<link>http://akfoerster.de/akffaq/</link>
</p></answer>

<question id="documentation">
Is there any documentation for AKFFAQ?
</question>

<answer><p>
No. Only this &FAQ;. &smiley;
</p></answer>
</section>

<section id="writing" title="writing FAQs">

<question id="example1">
Could you show me a small example to get me started?
</question>

<answer>
<code-block>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE akffaq SYSTEM "http://akfoerster.de/akffaq/akffaq.dtd"&gt;
&lt;?xml-stylesheet type="text/xsl" href="akffaq.xsl"?&gt;

&lt;akffaq xml:lang="en"&gt;

&lt;section&gt;
&lt;question id="greet"&gt;
Do you want to greet somebody?
&lt;/question&gt;

&lt;answer&gt;
Hello World!
&lt;/answer&gt;
&lt;/section&gt;

&lt;/akffaq&gt;
</code-block>

<p>
The first three lines might look complicated first. But don't worry.
In most cases you can simply copy them as they are. They are not always all
necessary, but it is better to put them in there, just in case.
</p>

<p>
Please note that there must be at least one <quote>section</quote>. 
If you want to use more than just one, you should use the attributes 
<quote>id</quote> and <quote>title</quote>.
</p>
</answer>

<question id="xml_line">
What does the first line mean?
</question>

<answer>
<p>
This line is makes it clear, that it is an &XML;-document. That line 
need not be there, but then you can only use the &UTF;-8 or &UTF;-16 
encoding.
</p>

<p>
The parameter <quote>version</quote> means the version of the &XML; 
specification.
It is <em>not</em> the version number for your &FAQ; nor is it the 
version number of AKFFAQ. Just use 1.0 for now and nothing else.
</p>

<p>
The encoding however is the encoding of <em>your</em> &XML;-file. &UTF;-8 is 
a good encoding for almost any language. But if your text-editor cannot 
save a text as &UTF;-8, then replace it with the encoding that your 
editor can use. On old systems you can replace it for example with 
<quote>ISO-8859-1</quote>.
</p>

<p>
But if you can save it as &UTF;-8, then use that!
</p>
</answer>

<question id="doctype">
What is the <quote>DOCTYPE</quote> line for?
</question>

<answer>
<p>
The DOCTYPE line is a reference to the 
<quote>Document Type Definition</quote> (DTD). The DTD file 
<quote>akffaq.dtd</quote> is the machine-readable specification of the 
AKFFAQ-format. This is used by some programs to check your file for 
formal errors. But note that a lot of programs don't do that.
</p>

<p>
In the DTD file there can also be definitions for so called 
<quote>entities</quote>. For example the akffaq.dtd defines &amp;smiley; 
for a smiley&nbsp;(&smiley;).
Unfortunately some programs don't read the DTD file at all, so that 
doesn't always work. &frowney; But there are hacks to work around it.
</p>
</answer>

<question id="stylesheet">
Now what is that <quote>xml-stylesheet</quote>-line for?
</question>

<answer>
<p>
This refers to the file <quote>akffaq.xsl</quote>. And that file is 
where the real work for AKFFAQ is done.
</p>

<p>
Actually I think <quote>stylesheet</quote> is really a misnomer. This 
is a script that converts the &XML;-file into &HTML;. It is not only 
a simple translation, but it is really a little programming language 
with which many things can be automated. For example in AKFFAQ the 
table of contents can be created automatically...
</p>

<p>
New web-browsers can display the &XML;-file with this script directly. 
But you can also use external tools to convert it into &HTML;, so 
that also older browsers are supported.
</p>
</answer>

<question id="tools1">
With which program can I convert it under GNU/Linux?
</question>

<answer>
<p>
Most GNU/Linux-Systems already have the tool <quote>xsltproc</quote>
installed. Use it like this: 
<kbd>xsltproc akffaq.xsl myfaq.xml &gt; myfaq.html</kbd>.
</p>

<p>
For more info see <link>http://xmlsoft.org/XSLT/xsltproc.html</link>.
</p>
</answer>

<question id="id">
Tell me more about the <quote>id</quote>-attribute.
</question>

<answer>
<p>
The <quote>id</quote> should be a unique identifier for the question 
or section. It should be short and without spaces. But you can 
use a hyphen or an underscore character inside of the identifier.
</p>

<p>
This identifier is used for the overview in the &HTML;-output. 
But it can also be used from other web pages to point to a 
specific question or section.
</p>

<p>
If you leave the <quote>id</quote> out, an id is automatically 
generated if needed. That works for the automatically generated 
overview. But it is not so good for links from external pages, because 
the generated id can be different from time to time.
</p>
</answer>

<question id="q-overview">
You mentioned an <quote>automatic overview</quote>. Tell me more about 
that.
</question>

<answer>
<p>
If you want to get an automatic overview for the &HTML;-output, you can 
put the command <code>&lt;overview back="back"/&gt;</code> either 
before the first section, or after the last one.
</p>

<p>Note, that there must be a slash before the closing 
angle-bracket!</p>

<p>With the <quote>back</quote>-attribute you can determine the name 
for the links back to the overview. You could also write 
<code>back="back to the overview"</code> or something like that.
</p>
</answer>

<question id="heading">
How can I write a headline for the &FAQ;?
</question>

<answer>
<p>User something like this: <code>&lt;heading&gt;About this and 
that&lt;/heading&gt;</code>. Put that line directly after the opening 
<code>&lt;akffaq&gt;</code>.
</p>
</answer>

<question id="paragraph">
How can I make paragraphs in the answers?
</question>

<answer>
<p>By enclosing each paragraph with <code>&lt;p&gt;...&lt;/p&gt;</code>.</p>

<p>
Unlike in &HTML; this always has to be used pairwise. You cannot leave
the closing <quote>&lt;/p&gt;</quote> away. If you use it, use it consequently.
</p>

<p><em>Attention:</em> Questions can not contain separated paragraphs!</p>
</answer>

<question id="links">
How can I include links?
</question>

<answer>
<p>There are actually two possibilities:</p>

<p>The easiest way is to enclose the link like this:
<code>&lt;link&gt;http://akfoerster.de&lt;/link&gt;</code>.
In this case the target of the link is also the shown text.</p>

<p>
If you want to have some other text as link, you can do it like in &HTML;:</p>
<p><code>&lt;a href="http://akfoerster.de"&gt;Andreas K. 
Förster&lt;/a&gt;</code>.</p>
</answer>

<question id="markup">
What other tags for marking text can be used?
</question>

<answer>
<p>
Emphasized text can be enclosed with <code>&lt;em&gt;...&lt;/em&gt;</code>.
Code segments can be enclosed with <code>&lt;code&gt;...&lt;/code&gt;</code>.
Larger code-blocks can be enclosed with 
<code>&lt;code-block&gt;...&lt;/code-block&gt;</code>.
For keyboard-inputs, you can use <code>&lt;kbd&gt;...&lt;/kbd&gt;</code>.
</p>
</answer>

<question id="any_html">
There are a lot of similarities to &HTML;. Can I use any deliberate 
&HTML; tag in AKFFAQ documents?
</question>

<answer><p>
No. I have defined many tags similar to &HTML; to make it easier for 
users, who already know &HTML; and because it was easier to convert it to 
&HTML;. But you can only use the tags and attributes, that are 
explicitely defined for AKFFAQ.
</p></answer>
</section>

</akffaq>

