Hi everyone,
I wanted to bring up the DITA 2.0 changes to the chunk attribute for discussion at an upcoming meeting. Originally prompted by a thread on dita-users, and then by follow-up discussions at DITA Europe, it's clear that the DITA 2.0 draft today loses an important capability that was available with DITA 1.x chunking.
The DITA 1.x specification allowed use of chunk="to-content" several times within a map branch. When set, the value would cause processors to create a single output document from that branch, up to the next chunk="to-content" value, when a new output chunk would begin. For example, I could have a map branch like this:
<topicref href="myservice.dita" chunk="to-content">
<topicref href="service-overview.dita"/>
<topicref href="service-why-use.dita">
<topicref href="service-specific-cost-benefits.dita">
</topicref>
<topicref href="service-login.dita" chunk="to-content">
<!-- detailed, reusable topics about login -->
</topicref>
<topicref href="accessing-data.dita" chunk="to-content">
<!-- reusable topics about policies, troubleshooting -->
</topicref>
<!-- ... more branches and chunks -->
</topicref>
In the case above, the chunk attributes would result in the following HTML documents (assuming that the name of the DITA file corresponds to the name of the HTML file):
- myservice.html, which also includes "service-overview" and the "service-why-use" branch
- service-login.html, which also includes child topics
- accessing-data.html, which also includes child topics
- Likely other chunks from the commented-out sections
Examples 4 and 9 in this DITA 1.3 specification topic show that behavior, with branch chunked up until the next chunk begins:
https://dita-lang.org/1.3/dita/archspec/base/chunkingexamples
What we've lost in the latest draft of DITA 2.0, with the switch to use chunk="combine", is the ability to start a new chunk within a branch that is already being chunked. The language today says that once chunk="combine" is used, additional chunk attributes are ignored:
https://dita-lang.org/dita/archspec/base/chunk-attribute-combine
Our goal with this proposal was to simplify everything around chunking – reducing the number of tokens to two, and giving them simpler definitions. It's been a while since we reviewed this, but I believe my intent here was to say that other tokens – specifically, chunk="split" – could not be used once "combine" was in effect. I believe this was to avoid cases that seem both unnecessary and overly. For example, the goal was to outlaw examples like the following, where it's not clear what would happen with "logging-in.dita":
myservice.dita chunk="to-content"
about.dita
using.dita chunk="split"
logging-in.dita
I'd like to update the definition of chunk="combine" to clarify that once "combine" is in effect, only other "combine" values are used. Effectively, this changes the current language – "additional chunk attributes are ignored" – to something more like "other chunk tokens are ignored". Overall this would mean:
- Cleaning up the three bullets today that govern chunk="combine", to clarify that additional chunks can be created, and
- Providing at least one good example of this behavior in the Examples section for chunking
Thanks,
Robert