Consider branch filtering in "Validate and Check for Completeness"
Posted: Wed Oct 26, 2022 12:49 am
We have topics that are reused in multiple books. Books apply different profiling conditions so that these reused topics include only the content relevant to that book:
Our WebHelp map applies profiling conditions to the book submaps using branch filtering (<ditavalref>):
When the WebHelp map is published, the DITA-OT applies branch filtering. Only the topic A link is published in book A, only the topic B link is published in book B, and publishing completes successfully with no unresolved key messages.
But when we run Validate and Check for Completeness on the WebHelp map, validation does not consider branch filtering (I think) and both profiled key references are considered in both topic-reuse instances:
This feature request is to consider branch filtering during Validate and Check for Completeness. Please let us know the issue ID so we can track this on our side.
Applying a global profiling condition as a proxy for branch filtering is a partial workaround, but different books have different branch filtering conditions, and so it is impossible to replicate all branch filtering at once. Another workaround is to run a transformation on the map and look for unresolved key messages, although these are information messages that can get lost among many other messages and require directed effort to look for.
Testcase:
Code: Select all
<topic id="topic_shared">
<title>My Shared Topic</title>
<body>
<p>This is some text.</p>
<p product="A">For details, see <xref keyref="topic_A"/>.</p>
<p product="B">For details, see <xref keyref="topic_B"/>.</p>
</body>
</topic>
Code: Select all
<map>
<title>Online Help</title>
<topichead navtitle="Books for Product A">
<topicref format="ditamap" href="dita/bookA.ditamap" keyscope="bookA">
<ditavalref href="ditaval/filter_A.ditaval"/>
</topicref>
</topichead>
<topichead navtitle="Books for Product B">
<topicref format="ditamap" href="dita/bookB.ditamap" keyscope="bookB">
<ditavalref href="ditaval/filter_B.ditaval"/>
</topicref>
</topichead>
</map>
But when we run Validate and Check for Completeness on the WebHelp map, validation does not consider branch filtering (I think) and both profiled key references are considered in both topic-reuse instances:
Code: Select all
Cannot find definition for key "topic_B". Key Scopes:[[bookA]]. Keys are gathered from: OPENME2.ditamap.
Cannot find definition for key "topic_A". Key Scopes:[[bookB]]. Keys are gathered from: OPENME2.ditamap.
Applying a global profiling condition as a proxy for branch filtering is a partial workaround, but different books have different branch filtering conditions, and so it is impossible to replicate all branch filtering at once. Another workaround is to run a transformation on the map and look for unresolved key messages, although these are information messages that can get lost among many other messages and require directed effort to look for.
Testcase: