Chapters

Each chapter is thus a separate XForms document. This has amazing advantages when talking about XForms, because the text can actually contain the examples it is describing, rather than descriptions of the expected output.

For example, if a chapter contains the text:

By default, outputs directly after each other will abut. If a is 3, and b is 4, then

<output ref="a"/><output ref="b"/>

will output:

34

the underlying code is:

By default, outputs directly after each other will abut.
If a is <output  ref="a"/>, and b is <output ref="b"/>, then
<group class="pre">
   &lt;output ref="a"/>&lt;output ref="b"/>
</group>
will output:
<group class="pre">
   <output ref="a"/><output ref="b"/>
</group>

In other words a really is 3, and b really is 4, and the example output is produced by the code itself.

This of course has immense advantage: you make fewer mistakes, you can put decisions off, or make changes easily without worrying about consistency between text and results.