#### 27.2.2 Specifying a chunking policy

These settings establish a default chunking policy, to determine how topics are assorted into output files for each referenced document. The settings take effect for the entire map, unless chunking attributes are already present on the map element, and except where chunking attributes are present on individual topicref elements.

Note: There is no default policy if you do not set a chunking policy. However, in the absence of any settings to the contrary, DITA2Go uses chunk by topic for HTML output and chunk by document for RTF output.

Default output file names are overridden by copy-to attributes.

You can specify default policies for:

Aggregation of topics

Selection of topics.

Aggregation of topics

To specify chunking by topic or by document:

    [Chunking]
    ; ChunkBy = Document (put all topics in one output file,
    ; or Topic (put each topic into its own file).
    ChunkBy = Topic

DITA2Go distributes topics according to the value of ChunkBy:

Document | All referenced topics go into one output file, named for the top-level map or document.
Topic | Each referenced topic goes into its own output file, named for the topic ID.

There is no default value for ChunkBy.

Selection of topics

To specify selection of all topics, of just the referenced topic, or of the referenced topic and all its descendants:

    [Chunking]
    ; ChunkSel = Document (include all topics in the document,
    ; Topic (include only the topic id'd in the <topicref>, or
    ; Branch (include the id'd (or first) topic and all of its children).
    ChunkSel = Topic

DITA2Go includes topics according to the value of ChunkSel:

Document | All topics in the referenced document are included in a single file.
Topic | A separate file is produced for each referenced topic.
Branch | The file for each referenced topic includes all topics logically nested in (descended from) that topic.

ChunkSel has no meaning for files that contain just one topic, only for those that contain nested topics, or topics wrapped in <dita>.

There is no default value for ChunkSel.

Previous Topic: 27.2.1 Choosing between splitting and chunking

Next Topic: 27.2.3 Providing a page break between title and TOC

Parent Topic: 27.2 Chunking DITA maps

Sibling Topics:

27.2.1 Choosing between splitting and chunking

27.2.3 Providing a page break between title and TOC

27.2.4 Producing a single HTML file that includes generated lists