Shallow Numbering for Chapters OnlyEdit online
<topicref> elements that are placed on the first level.
For bookmaps, the chapters are the topics referenced by a
<chapter> element. Shallow Numbering - Input XML FragmentsEdit online
The numbering affects three parts of your publication, the table of contents, headers/footers, and chapter titles:
The Table of Contents
The table of contents is a tree of <topicref> elements.
<map xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" ...> <oxy:front-page xmlns:oxy="http://www.oxygenxml.com/extensions/author" class=" front-page/front-page "> ... </oxy:front-page> <opentopic:map xmlns:opentopic="http://www.idiominc.com/opentopic" class=" toc/toc "> <title class="- topic/title ">Publication Title</title> <topicref is-chapter="true" class="- map/topicref " ... > <topicmeta class="- map/topicmeta " ... > <navtitle href="#unique_1" class="- topic/navtitle ">Overview</navtitle> ... </topicmeta> <topicref class="- map/topicref " ...> <topicmeta class="- map/topicmeta " data-topic-id="dcpp_resources"> <navtitle href="#unique_2" class="- topic/navtitle ">Resources</navtitle> ... </topicmeta> </topicref> ... </opentopic:map> ... </map>
<opentopic:map> element contains the effective table of
contents structure.- map/topicref.@is-chapter attribute
set.For the DITA Map PDF - based on HTML5 &
CSS transformation type, the merged map is further processed
resulting in a collection of HTML5 <div> elements. These
elements preserve the original DITA @class attribute values and
add a new value derived from the DITA element name.
<div class="- map/map map" ...> <div class=" front-page/front-page front-page"> ... </div> <div class=" toc/toc toc"> <div class="- topic/title title">Publication Title</title> <div is-chapter="true" class="- map/topicref topicref" ... > <div class="- map/topicmeta topicmeta" ... > <div href="#unique_1" class="- topic/navtitle navtitle">Overview</div> ... </div> <div class="- map/topicref " ...> <div class="- map/topicmeta " data-topic-id="dcpp_resources"> <div href="#unique_2" class="- topic/navtitle ">Resources</div> ... </div> </div> ... </div> ... </div>
The Header and Footers
These are based on string sets generated for the titles. The complete set of strings is defined in: [INSTALLATION_DIR]/css/print/p-pages-and-headers.css.
<oxy:front-page xmlns:oxy="http://www.oxygenxml.com/extensions/author"> <oxy:front-page-title> <title class="- topic/title ">Publication Title</title> </oxy:front-page-title> </oxy:front-page>
<div class=" front-page/front-page front-page"> <div class=" front-page-title/front-page-title front-page-title"> <div class="- topic/title title ">Publication Title</div> </div> </div>
<map xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" ...> ... <opentopic:map xmlns:opentopic="http://www.idiominc.com/opentopic"> ... </opentopic:map> <topic is-chapter="true" oid="dcpp_overview"> <title class="- topic/title ">Overview</title> <body class="- topic/body "> ... </body> <topic class="- topic/topic " id="unique_2" oid="dcpp_resources"> <title class="- topic/title ">Resources</title> ... </topic> <topic class="- topic/topic " id="unique_2" oid="dcpp_parameters"> <title class="- topic/title ">Parameters</title> ... </topic> </topic>
<div class=" map/map map" ...> ... <div class=" toc/toc toc"> ... </div> <div is-chapter="true" oid="dcpp_overview" class="- topic/topic topic"> <div class="- topic/title title">Overview</title> <div class="- topic/body body"> ... </div> <div class="- topic/topic topic" id="unique_2" oid="dcpp_resources"> <div class="- topic/title title">Resources</div> ... </div> <div class="- topic/topic topic" id="unique_2" oid="dcpp_parameters"> <div class="- topic/title title">Parameters</div> ... </div> </div>
<opentopic:map> element.- topic/topic
included in the parents.@is-chapter attribute
set.The Titles of Chapters
<topic class="- topic/topic " id="unique_2" oid="dcpp_parameters"> <title class="- topic/title ">Parameters</title> ... </topic>
<div class="- topic/topic topic" id="unique_2" oid="dcpp_parameters"> <div class="- topic/title title ">Parameters</div> ... </div>
- topic/title. The actual element
name can be different.Shallow Numbering - Built-in CSSEdit online
There is a file located in [PLUGIN_DIR]/css/print/p-numbering-shallow. This contains all the rules for numbering only the topics on the first level (the chapters).