Open raducoravu opened 6 years ago
Guessing this is the same NPE I noticed in #1550 -- getting it now with pdf2
with the original version of these: https://github.com/dita-ot/dita-ot/tree/hotfix/3.0.2/src/test/resources/ChunkModuleTest/src/with_non_dita
The issue is with
<map id="chapter.installation" title="Introduction">
<topicref href="topics/introduction.dita" chunk="select-branch to-content"
collection-type="unordered">
<topicmeta>
<data name="wh-menu">
<data name="hide" value="yes"/>
</data>
</topicmeta>
<topicref href="topics/start.dita"/>
</topicref>
<topichead navtitle="TopicHead">
<topicref href="topics/start.dita"/>
</topichead>
</map>
and the select-branch
chunk action. In this case it will never actually select anything, because the topicref points to a topic root.
A workaround is to remove the select-branch
action.
Fixing the actual NPE can be done later.
One possible optimization is actually to remove chunk combinations that will never change the output. For example:
@href
without topic fragment identifier and @chunk
with select-document
or select-branch
: this will always be the same output as without chunk processing.
Attaching the sample DITA project I'm publishing to PDF using DITA OT 3.0.1:
npeCleanPreprocessModule.zip
The publishing breaks with:
This used to work with DITA OT 2.x.