section
and sectn
ElementsYou need to know the differences and advantages of
using a section
vs. a sect
element.n
The differences between section
vs.
sect
are shown in Table 1.2, “Comparison Between n
section
and sect
Elements”: n
Apart from technical issues, using section
or
sect1
is in most cases a matter of taste. However,
knowing some of the differences in Table 1.2 can be helpful to decide which better suits
your document.
Nesting Level. If you have documents that go further than level five,
use the section
element. This can be nested infinitely.
On the other hand, if you want to restrict the levels to
five, better use the sect
elements. You can, however,
use DocBook's RELAX NG schema to customize it further (see next
section).n
Readability. This issue depends on how you edit your DocBook source code.
If you edit it manually in your editor (in other words: without
the aid of some kind of WYSIWYG), you can see and
understand the level straight from the tag name when using
sect
. Especially if you have lots of nested
sections this makes it a lot easier than n
section
.
However, modern XML editors can show the XPath where
you are, so it may be negligible.
Relocation. If you have to change the structure a lot, using
section
elements makes it a lot easier. If you use a
sect2
element and this should become a sect1
element you have to rename it.
http://www.docbook.org/tdg51/en/html/ch05.html#ex.limitsdepth
Project@GitHub | Issue#6 |