DITA 2.0 proposed feature #29

The goal of the redesign is to remediate problems but avoid breaking backward compatibility.

Modify bookmap design

Proposal version
Completion date
March 27, 2018
Champion of the proposal
Eric Sirois
Initial Suggestion
Links to minutes where this proposal was discussed at stage 1 and moved to stage 2
GitHub Issue

Original requirement or use case

Overall the bookmap DTD has not been updated as part general DITA releases for a couple releases. It is missing some convenient key features that were added as part of DITA 1.2 and 1.3. The proposal will make it easier to make use of <ditavalref> at the root level and make it easier to create and maintain keydefs.

Use cases

  1. A writer wants to create a keydefs for a map in a convenient location in the map.

    The current version of the DITA Bookmap does allow keydefs to be created, but you need to do it inside one of the main top-level elements. like <frontmatter>. But it's not convenient because it's buried in an unrelated element.

  2. A writer wants to specify a ditaval used for the whole map via a <ditavalref>.

    The current version of the DITA Bookmap does not allow <ditavalref> as an immediate child of <bookmap>. Creating them inside one of the child elements of <bookmap>, like <frontmatter>, then the <ditavalref> only applies to the children of that element.

  3. A writer wants to indicate a list of <amendments> in the <frontmatter> of a book.
  4. A writer wants to use <glossref> to reference a glossary topic within <glosslist>.

Proposed solution

The purpose of the proposal is to add some enhancements to bookmap, with a minimal amount of impact at the processing end of the pipeline, but make things a bit easier for the end user.
  • Add <ditavalref> before <frontmatter>
  • Create a <mapresources> as an element that will allow users to reference elements that are specializations of <topicref>.
  • Add <amendments> to <frontmatter>. If <amendments> contains an @href, then process as expected. Otherwise, process the content for revision history
  • Add <glossref> to element content model for <glosslist>.


  • Authors will benefit from the more intuitive use of keydefs.
  • Information architects/developers will benefit being able to add a specialization for custom processing of bookmaps.
  • Information architects will be able to use the same bookmap for multiple outputs using different set of conditions

Technical requirements

This change is adding two elements, that already supported in DITA 1.3, to the root content model of the bookmap DTD and as such, will have essentially no technical impact. There will be an impact for implementing the logic to support change-history from <amendments>

Provide a detailed description of how the solution will work. Be sure to include the following details:
DTD and Schema modifications.
New domain
  • Map resources
    • Add a domain specializations that will allow the definition of a wrapper element to define <keydefs> in a <bookmap> or other strictly constrained publication maps. This domain is based on <mapresources>
New element
  • <mapresources>
    • This element is a container that allows specializations of <topicref> to be available in a bookmap. The element is defined as resource-only element. The element also allows @keyscope.
    • The element is optional after the <ditavalref>.
Add existing DITA elements to content models in bookmap
  • <ditavalref>
    • This is an existing element that is available in the base <map>. We are simply making it available in the top level portion of <bookmap>
    • The element is optional after the <bookmeta>.
  • <glossref>
    • This is an existing element that is available in the base <map>. We are simply making it available in the top level portion of <bookmap>
    • The element is optional after the <glosslist>.
  • <amendments>
    • This is an existing element that is available in <backmatter>. We are simply making it available in <frontmatter> and adding behaviour on the processing side.
    • The element is optional in <frontmatter>
Processing impact

<ditavalref> and <glossref> are already supported features of DITA 1.3. And <mapresources> is a specialization of topicref as a resource-only element.

For <amendments>, if the element does not have a reference to a topic, then process the content in the map as revision history when <change-historylist> element exist.

Overall usability
Current DITA users and current document type shells will be unaffected. Usability of authoring will ultimately be improved due to better management of keydefs and use of ditavalrefs in the bookmap.


  • The main bookmap files need to be updated with the addition of a new domain file to support the solution for this proposal.
  • A new topic for documenting the domain and the container element. As well as an update to the bookmap topic.
  • Since we are adding elements that are already supported in DITA 1.3, there is no impact to processors and XML tools.
  • Adding functionality in the base PDF processing to treat <amendments> without an @href to auto-generate a revision history, based on the <change-historylist>.


Sample usage in a bookmap:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA 2.0 BookMap//EN" "bookmap.dtd">
    <ditavalref href=""/>
        <keydef keys="test" href=""></keydef>
Element definition in the bookmap DTD:

     <!ENTITY % bookmap.content
     "((%title; | %booktitle;)?,
     ((%appendices;)? |
Element override in the bookmap shell:
<!ENTITY % mapresources  "%mapresources-d-mapresources;

Domain definition:

<!ENTITY % mapresources
                       "mapresources"                               >

<!-- ============================================================= -->
<!--                    ELEMENT DECLARATIONS                       -->
<!-- ============================================================= -->

<!ENTITY % mapresources.content

<!ENTITY % mapresources.attributes

<!ELEMENT  mapresources %mapresources.content;>
<!ATTLIST  mapresources %mapresources.attributes;>

<!ATTLIST  mapresources %global-atts;  class CDATA "+ map/topicref  mapresources-d/mapresources ">

Domain entity definition:

    <!ENTITY % mapresources-d-mapresources
    <!ENTITY mapresources-d-att
    "(map mapresources-d)"
Adding amendments to frontmatter
<!--                    LONG NAME: Front Matter                    -->
<!ENTITY % frontmatter.content
                       "(%amendments; |
  		         %bookabstract; |
                         %booklists; |
                         %colophon; |
                         %dedication; |
                         %draftintro; |
                         %notices; |
                         %preface; |
Adding glossref to the glossarylist
<!--                    LONG NAME: Glossary List                   -->
<!ENTITY % glossarylist.content