XML technologies / DocBook / Structural elements / Sections / Nested sections

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

DocBook provides two ways to nest sections:

The following examples are structurally equivalent:

Example: Comparing nested sections using section and sect1 (section.xml)

<chapter>
    <!-- ... -->
    <section>
        <title>Ein Abschnitt</title>
        <para>Dies ist ein normaler Abschnitt.</para>
        <section>
            <title>Ein Unterabschnitt</title>
            <para>Dies ist ein Unterabschnitt.</para>
        </section>
    </section>
</chapter>

<chapter>
    <!-- ... -->
    <sect1>
        <title>Ein Abschnitt</title>
        <para>Dies ist ein normaler Abschnitt.</para>
        <sect2>
            <title>Ein Unterabschnitt</title>
            <para>Dies ist ein Unterabschnitt.</para>
        </sect2>
    </sect1>    
</chapter>

The two markup methods differ as follows:

  

 

 

 

 

back to top