Documentation
Elements
- <a>
- <aside>
- <assessment>
- <author>
- <backcover>
- <blockquote>
- <body>
- <bodymatter>
- <caption>
- <code>
- <cover>
- <dd>
- <dl>
- <document>
- <dt>
- <em>
- <figure>
- <figureGroup>
- <frame>
- <frontcover>
- <frontmatter>
- <hd>
- <img>
- <input>
- <jacketcopy>
- <legend>
- <li>
- <line>
- <linegroup>
- <list>
- <meta>
- <metadata>
- <note>
- <noteRef>
- <number>
- <p>
- <page>
- <poem>
- <pullquote>
- <rearmatter>
- <section>
- <source>
- <span>
- <sub>
- <subtitle>
- <sup>
- <table>
- <tbody>
- <td>
- <tfoot>
- <th>
- <thead>
- <title>
- <tr>
Sectioning
This page explains how to structure books using <section>. It helps to organize book content clearly and correctly. The <section> element is important for structuring a book and uses attributes to define levels and roles.
Section Element Structure
The <section> element defines different parts of a book. It can include pages, paragraphs, images, tables, and more. Each <section> must have the attributes level and role to show its position and function in the book.
Attributes
- level (required): Shows where the section fits in the book’s structure (number between
1and6).1is the highest level (e.g., main parts of a book).6is the lowest level (deeply nested content).
- role (required): Describes the purpose of the section in the book.
Section Role Definitions
The role attribute groups sections based on their function. Below are the different roles and their meanings:
Main Book Sections
- part: Large divisions of a book.
- chapter: A main chapter in a book.
- subChapter: A smaller section inside a chapter.
- toc: The Table of Contents.
- practice: Exercises or activities.
- summary: A short review of key points.
Front Matter (Beginning of the Book)
- titlePage: The book’s title page.
- frenchTitlePage: A second title page, often in another language.
- dedication: A dedication section.
- preface: An introduction explaining the book’s purpose.
- introduction: A general introduction.
- prologue: A section before the main content.
- colophon: Publication details.
Rear Matter (End of the Book)
- endNotes: Notes at the end of the book.
- chapterNotes: Notes for a specific chapter.
- afterword: A concluding section.
- bibliography: List of references and sources.
- index: A list of terms with page numbers.
- appendix: Extra content at the end of a book.
- other: Any section that does not fit into the listed categories.
Using the Level Attribute Correctly
The level attribute helps organize sections:
level="1"→ Highest-level sections (e.g., parts, chapters)level="2"→ Sections inside chapters (subchapters) or in case of different book parts these might be chapters.level="3" to level="6"→ Further sub-sections. In practice most books wil consist of no more than 4 levels.- When there is no clear indication of further nesting of content (ie. paragraph numbers) there might be no sufficient reason to use sections.
Often table of contents can give a clear indication on how to use levels in the XML.
Example Usage
<section level="1" role="part">
<hd level="1">Part 1: Foundations</hd>
<section level="2" role="chapter">
<hd level="2">Chapter 1: Introduction to Mathematics</hd>
<section level="3" role="subChapter">
<hd level="3">Basic Operations</hd>
<p>Mathematics is the foundation of science...</p>
</section>
</section>
</section>
Elements Inside Sections
A <section> can contain:
<annoRef><annotation><assessment><aside><author><blockquote><code><dl><figure><figureGroup><frame><hd><img><linegroup><list><m:math><note><noteRef><page><p><poem><pre><pullquote><publisher><section><source><subtitle><table><title>
Best Practices
- Use a clear structure by setting correct nesting levels.
- Choose the right role to make sections meaningful.
- Add corresponding headings to help identify sections.
- Check that all tags are closed properly.
- Keep the structure simple, without unnecessary nesting.
Following these guidelines will help create well-structured schoolbooks for easy reading and digital processing.