Content may be chunked (divided or merged into new output documents) in different ways for the purposes of authoring, for delivering content, and for navigation. For example, something best authored as a set of separate topics may need to be delivered as a single Web page. A map author can use the chunk attribute to split up single documents into component topics or combine multiple topics into a single document as part of output processing.
Here are some examples of potential uses of the chunk attribute:
When a set of topics is transformed for output using a map, the map author may use the chunk attribute to override whatever default chunking behavior applies. The chunk attribute allows the map author to request that multi-topic documents be broken into multiple documents, and that multiple individual topics be combined into a single document.
Chunking is necessarily output transformation specific with chunked output required for some and not supported for other types of output. Chunking is also implementation specific with some implementations supporting some, but not all, chunking methods, or adding new implementation specific chunking methods to the standard methods described in this specification.
Some tokens or combinations of tokens may not be appropriate for all output types. When unsupported or conflicting tokens are encountered during output processing, warning or error messages should be produced. Recovery from such conflicts or other errors is implementation dependent.
There is no default value for the chunk attribute and the chunk attribute does not inherit values from container elements. A default for an entire map may be established by setting the chunk attribute on the map element.
When no chunk attribute values are given, chunking behavior is implementation dependent and may vary for different implementations. When variations of this sort are not desired, a default for the entire map may be established by including a chunk attribute value on the map element.
When creating new documents via chunk processing, the storage object name or identifier (if relevant) is taken from the copyto attribute if set, otherwise the root name is taken from the id attribute if the by-topic policy is in effect and from the name of the referenced document if the by-document policy is in effect.
<dita> <topic id="X"/> <topic id="Y"> <topic id="Y1"> <topic id="Y1a"/> </topic> <topic id="Y2"/> </topic> <topic id="Z"> <topic id="Z1"/> </topic> </dita>
<map chunk="by-document"> <topicref href="parent1.dita" chunk="to-content"> <topicref href="ditabase.dita#Y1" chunk="select-topic"/> </topicref> </map>Produces a single output document, parent1.xxxx containing topic P1 with topic Y1, but not topic Y1a nested in it.
<map chunk="by-document"> <topicref href="parent1.dita" chunk="to-content"> <topicref href="ditabase.dita" chunk="select-branch"/> </topicref> </map>Produces a single output document, parent1.xxxx containing topic P1, topic Y1 nested within topic P1, and topic Y1a nested within Y1.
<map chunk="by-topic"> <topicref href="parent1.dita" chunk="to-content"> <topicref href="ditabase.dita#Y1" chunk="select-document"/> </topicref> </map>Produces a single output document, P1.xxxx, containing topic P1 and topics X, Y, and Z together with their children nested within topic P1.
<map chunk="by-document"> <topicref href="parent1.dita" copyto="parentchunk"> <topicref href="nested1.dita" chunk="select-branch"/> </topicref> </map>Produces a single output document named parentchunk.xxxx containing topic P1 with topic N1 nested within P1 and topic N1a nested within N1.
<map chunk="by-document"> <topicref href="parent1.dita" chunk="to-content" copyto="parentchunk"> <topicref href="child1.dita" chunk="select-branch"/> <topicref href="child2.dita" chunk="to-content select-branch" copyto="child2chunk"> <topicref href="grandchild2.dita"/> </topicref> <topicref href="child3.dita"> <topicref href="grandchild3.dita" chunk="select-branch"/> </topicref> </topicref> </map>Produces two output documents: the P1, C1, C3, and GC3 topics in parentchunk.xxxx, and the C2 and GC2 topics in child2chunk.xxx.
<map> <topicref href="nested1.dita#N1" copyto="nestedchunk" chunk="to-content select-topic"/> </map>Produces a single output document, nestedchunk.xxxx, which contains topic N1 with no topics nested within.
<map> <topichead navtitle="How to do lots of things" chunk="to-navigation"> <topicref href="parent1.dita" navtitle="How to set up a web server"> <topicref href="child1.dita" chunk="select-branch"/> ... </topicref> <topicref href="parent2.dita" navtitle="How to ensure database security"> <topicref href="child2.dita" chunk="select-branch"/> ... </topicref> ... </topicref> </map>Produces two navigation chunks, one for P1, C1, … and a second for P2, C2, ….
The above example identifies a “how to” for setting up a product as a single unit. The “how to” might be provided both as navigable HTML pages and as a printable PDF attached to the root HTML page.
Return to main page.
OASIS DITA Architectural Specification v1.1 -- Committee Draft 13 February 2007
Copyright © OASIS Open 2005, 2007. All Rights Reserved.