XML technologies / DITA / Reusing content with maps and conref / Creating books: the bookmap

(Excerpt from “DITA – Der neue Standard für Technische Dokumentation” by Johannes Hentrich)

A collection of topics is a long way from a complete book. Besides the actual content, which may combine task, reference and concept topics into the book body, a book also contains components such as:

A simple map cannot represent this structure. DITA 1.1 therefore introduced bookmaps for creating conventional books.

Book components

A bookmap is defined by the element <bookmap>. Within this element <bookmap>, book components are divided into five blocks. The following elements define these blocks:

  • <booktitle>: contains all information about the book’s title.

  • <frontmatter>: contains further information about front matter, the table of contents and the preface.

  • <part>, <chapter>, <topicref>: these elements define the book body’s structure: its parts, chapters and the topics they contain.

  • <appendix>: references a possible appendix.

  • <backmatter>: contains further lists such as the index and glossary.

A bookmap therefore has the following structure:

<bookmap id="beispiel_struktur">
    <booktitle></booktitle>
    <frontmatter></frontmatter>
    <part>
        <chapter>
            <topicref/>
            ...
        </chapter>
    </part>
    <appendix></appendix>
    <backmatter></backmatter>
</bookmap>

Further elements specify the information within each block. They are introduced below.

The element <booktitle> contains the following elements:

  • <booklibrary>: the element <booklibrary> stores bibliographic information.

  • <mainbooktitle>: contains the book’s title.

  • <booktitlealt>: contains the book’s subtitle.

This book’s data illustrates the use of these elements:

<booktitle>
    <booklibrary>Die Deutsche Bibliothek - CIP-Einheitsaufnahme...</booklibrary>
    <mainbooktitle>DITA</mainbooktitle>
    <booktitlealt>Der neue Standard für Technische Dokumentation </booktitlealt>
</booktitle>

The element <frontmatter> contains the following elements:

  • <booklists>: the element <booklists> inserts lists into a book. The element <booklists> can be used both inside the element <frontmatter> and inside the element <backmatter> at the end of the book. When the element <booklists> is used inside the element <frontmatter>, it inserts a table of contents, itself marked by the element <toc>. The element <toc> tells the DITA Open Toolkit where to insert the automatically generated table of contents. It is therefore included as follows:

<booklists>
    <toc/>
</booklists>

  • <notices>: this element references publisher, author, editor, copyright and similar information, that is, the element <notices> references the imprint page. Other front-matter pages, the second page (frontispiece) and third page (title page), can be included through the familiar element <topicref>. As with the element <topicref>, the element <notices> references topics through the attribute href.

 <notices href="impressum.dita"/> 
  • <dedication>: references a topic containing a dedication, for example:

 <dedication href="widmung.dita"/> 
  • <preface>: references a preface or introduction, for example:

 <preface href="vorwort.dita"/> 
  • <bookabstract>: references a brief summary placed at the beginning of the book, for example

 <bookabstract href="zusammenfassung.dita"/> 

The book body containing the actual content is structured through these elements:

  • <part>: the element <part> divides a book into several parts.

  • <chapter>: individual chapters are delimited by the element <chapter>.

  • <topicref>: individual topics within a chapter are referenced through the familiar element <topicref>.

This book’s structure serves as a book-body example:

<topicref href="dita_im_uerblick.dita"/>
<part href="konzepte_hinter_dita.dita">
    <chapter href="verwendung_bekannter_technologien.dita">
        <topicref href="charles_darwin.dita"/>
        <topicref href="zielsetzung.dita"/>
        ...
    </chapter>
    ......
</part>
<part href="arbeiten_mit_dita.dita">
    <chapter href="topics_erstellen.dita">
        <topicref href="generisches_topic.dita">
            ...
        </topicref>
        ...
    </chapter>
</part>
...

Appendices use the element <appendix>. Within it, the element <topicref> can reference further topics, for example:

<appendix href="anhang_a_dita_elemente.dita">
    <topicref href="elemente_fuer_bookmaps.dita"/>
</appendix>

The final block in a bookmap consists of elements inside the element <backmatter>. These elements are available:

  • <booklists>: as with the element <frontmatter>, insert lists here, for example with the element <glossarylist> for a glossary and the element <indexlist> for an index. Both the element <glossarylist> and the element <indexlist> tell the DITA Open Toolkit where to place the automatically generated lists. A glossary and index are therefore included as follows:

<booklists>
    <glossarylist/>
    <indexlist/>
</booklists>

  • <colophon>: an element <colophon> references a topic describing how the book was produced.

  • <amendments>: if additions are needed, reference them with the element <amendments>.

Combining all blocks’ elements gives a complete bookmap. In the following example, the block-delimiting elements are bold.

<bookmap id="dita_buch">
    <booktitle>
        <booklibrary>Die Deutsche Bibliothek – CIP-Einheitsaufnahme...</booklibrary>
        <mainbooktitle>DITA</mainbooktitle>
        <booktitlealt>Der neue Standard für Technische Dokumentation</mainbooktitle>
    </booktitle>
    <frontmatter>
        <notices href="impressum.dita"/>
        <booklists>
            <toc/>
        </booklists>
        <preface href="vorwort.dita"/>
    </frontmatter>
    <topicref href="dita_im_uerblick.dita"/>
        <part href="konzepte_hinter_dita.dita">
            <chapter href="verwendung_bekannter_technologien.dita">
                <topicref href="charles_darwin.dita"/>
                <topicref href="zielsetzung.dita"/>
            </chapter>
        </part>
        <part href="arbeiten_mit_dita.dita">
            <chapter href="topics_erstellen.dita">
                <topicref href="generisches_topic.dita">
                </topicref>
            </chapter>
        </part>
        ...
        <appendix href="anhang_a_dita_elemente.dita">
            <topicref href="elemente_fuer_bookmaps.dita"/>
        </appendix>
        <backmatter>
            <booklists>
                <glossarylist/>
                <indexlist/>
            </booklists>
        </backmatter>
</bookmap>

Book metadata

Besides the book’s actual information, DITA can capture extensive book metadata through the element <bookmeta>.

In a bookmap, the element <bookmeta> is positioned as follows:

<bookmap id="beispiel_struktur">
    <booktitle></booktitle>
    <bookmeta><bookmeta/>
        <frontmatter></frontmatter>
        <part>
            <chapter>
                <topicref/>
                ......
            </chapter>
        </part>
        <appendix></appendix>
        <backmatter></backmatter>
</bookmap>

The element <bookmeta> contains numerous elements, including these important ones:

  • <bookid>: the element <bookid> contains publisher-information elements, including:
    - <isbn>: contains the ISBN.
    - <booknumber>: contains the publisher’s internal book number.
    - <maintainer>: Contains information about who maintains the book: a person marked with the element <person> or an organization marked with the element <organization>.

  • <bookrights>: the element <bookrights> contains copyright-information elements, including:
    - <copyrfirst>: contains the first year inside an element <year> when a copyright year range is specified. A single year also uses the element <copyrfirst>.
    - <copyrlast>: contains the last year inside an element <year> when a copyright year range is specified.
    - <bookowner>: contains information about the copyright holder.

The following example shows how these elements are used for this book:

<bookmeta>
    <bookid>
        <isbn>978-3981143003</isbn>
        <booknumber>XL-1</booknumber>
        <maintainer>
            <organization>XLcontent Verlag</organization>
            <person>Johannes Hentrich</person>
        </maintainer>
    </bookid>
    <bookrights>
        <copyrfirst>
            <year>2008</year>
        </copyrfirst>
        <bookowner>
            <organization>XLcontent Verlag</organization>
        </bookowner>
    </bookrights>
</bookmeta>

Author information is stored in the element <authorinformation>, part of the xNAL domain. This domain joined DITA in version 1.1 and provides numerous address-information elements. Within the element <authorinformation>, the element <personinfo> captures personal details, using elements including:

  • <namedetails>: the element <namedetails> is nested further. Inside the element <personame>, author details include the first name in the element <firstname> and the surname in the element <lastname>.

  • <addressdetails>: the element <addressdetails> also contains further address information. The element <thoroughfare> stores street information. Inside the element <locality>, the element <localityname> stores the city name and the element <postalcode> the postal code. Finally, the element <country> contains the country name.

  • <contactnumbers>: contains phone numbers, with each number stored in an element <contactnumber>.

  • <emailaddresses>: contains email addresses, with each address stored in an element <emailaddress>.

Further information about xNAL-domain elements is provided in “xNAL domain”.

The following example shows how these elements are used for this book:

<authorinformation>
    <personinfo>
        <namedetails>
            <personname>
                <firstname>Johannes</firstname>
                <lastname>Hentrich</lastname>
            </personname>
        </namedetails>
        <addressdetails>
            <thoroughfare>Pflegerstraße 40</thoroughfare>
            <locality>
                <localityname>München</localityname>
                <postalcode>81247</postalcode>
            </locality>
            <country>Deutschland</country>
        </addressdetails>
        <contactnumbers>
            <contactnumber>++49 89 89161590</contactnumber>
        </contactnumbers>
        <emailaddresses>
            <emailaddress>info@xlcontentverlag.de</emailaddress>
        </emailaddresses>
    </personinfo>
</authorinformation>

  

 

 

 

back to top