Page 1 of 1
HTML generated even for non referenced topic
Posted: Fri Apr 28, 2023 5:54 pm
by LASSE_MLE
<oXygen/> XML Editor 24.1, build 2022030807
DITA Map WebHelp Responsive
Hello everyone,
While delivering a documentation package, I accidentally noticed that some topics were published even though they were not referenced in the mother ditamap...
For some of them, I understood that, in a topic to be published, I was going to look for an image in this topic. But for some I really don't understand why.
We have the same tree structure for two different products and we don't want some HTML pages to be seen by customers who don't have this machine. Everything is handled with
product flags.
Is it possible that I have forgotten a compiler option? Is it possible to not generate HTML files for topics not referenced in the ditamap in question?
Even if they do not appear in the menu, they are present in the search module and physically on the disk.
To clarify what I'm saying, I've made a quick diagram (attached to this ticket).
I have three documents A, B and C. When I deliver my document package for product A, pages B1, B2, C1 and C2 should not be generated. And by deduction that they do not appear in the search module.
My question is a bit complex, especially without having the sources. I have added a screenshot of the compilation options and the associated ditaval.
I hope you can help me, deleting each unwanted HTML by hand would take me days

Good evening,
ML
Re: HTML generated even for non referenced topic
Posted: Fri Apr 28, 2023 6:20 pm
by LASSE_MLE
Perhaps another example to clarify my request:
- If I search for one topic for Product A in the top of the mother ditamap, it found the ditamap(s) where it is referenced
- If I search for one topic for Product B in the top of the mother ditamap, it does not found anything
- But both topics are generated in HTML format
BugHTML03.png
Re: HTML generated even for non referenced topic
Posted: Sat Apr 29, 2023 2:44 pm
by chrispitude
Hi LASSE_MLE,
This is sometimes not an easy issue to figure out.
If you have an accidental <xref href="..."/> into an unwanted topic file, the DITA-OT will include that topic in the publishing output. It will also include any further topic files referenced by that one, and so on. This can create "unwanted inclusion regions" when there is an accidental reference into an unwanted book. This file inclusion happens only with @href references, not @keyref references.
There are also some DITA-OT issues related to duplicate and unexpected topics in the output directory. Any of these might be your issue, but they might not be.
You could create a copy of your DITA, pick a single unwanted topic in the output, then keep reducing the testcase in ways that continue to reproduce the issue. Eventually you should be able to narrow it down to a single root cause, and it will probably be easier to figure out what to do at that point.
Re: HTML generated even for non referenced topic
Posted: Sun Apr 30, 2023 8:24 pm
by LASSE_MLE
Thank you chrispitude for your advices.
I will try this way
BR
ML
Re: HTML generated even for non referenced topic
Posted: Tue May 02, 2023 11:08 am
by LASSE_MLE
Hello all,
I've isolated one topic for a deep analysis.
And I still do not understand what's happening...
Can you please just confirm that:
- When I code
Code: Select all
<ul>
<li product="ProdA"><xref href="FileA.dita"></li>
<li product="ProdB"><xref href="FileB.dita"></li>
</ul>
- With a ditaval excluding ProdB
Code: Select all
<val>
<prop action="include" att="product" val="ProbA"/>
<prop action="exclude" att="product" val="ProbB"/>
- The FileB.dita will not be generated ?
I've checked and there is no other reference to this FileB anywhere.
Thanks by advance for your help....
BR
ML
Re: HTML generated even for non referenced topic
Posted: Tue May 02, 2023 1:23 pm
by chrispitude
Hi ML,
If this is reduced down to just a few files, can you post the testcase archive so we can take a look?
Re: HTML generated even for non referenced topic
Posted: Tue May 02, 2023 4:52 pm
by cosmin_andrei
Hi LASSE_MLE,
To be sure that everything is fine you can try to edit the WebHelp transformation scenario and set clean.output parameter to "yes" (make sure you create a backup of the output folder before setting this parameter just to be safe in case you might need some of the previous resources). This way you can be sure that in the output there are not any files from the previous transformation.
Re: HTML generated even for non referenced topic
Posted: Tue May 02, 2023 5:35 pm
by LASSE_MLE
Thank you all for your help, but I finally succeed!
Many modifications of issues due to my beginner level in DITA coding (mainly content reuse wrongly implemented and unthinking part of code written when we have only one product).
After double check, I'm now only with the html I wanted!
#savedfortoday
Thanks for putting me on the right track

BR
ML
Re: HTML generated even for non referenced topic
Posted: Tue May 02, 2023 5:37 pm
by LASSE_MLE
cosmin_andrei wrote: ↑Tue May 02, 2023 4:52 pm
Hi LASSE_MLE,
To be sure that everything is fine you can try to edit the WebHelp transformation scenario and set
clean.output parameter to "
yes" (make sure you create a backup of the output folder before setting this parameter just to be safe in case you might need some of the previous resources). This way you can be sure that in the output there are not any files from the previous transformation.
Hi Andrei,
I used to do it manually! I am glad to hear that it is possible to do it automatically!
Thanks!
Re: HTML generated even for non referenced topic
Posted: Wed May 03, 2023 12:35 am
by chrispitude
Hi ML,
Great work figuring out your issue!
And Cosmin's suggestion for enabling the output directory cleanup parameter was also a good best practice for WebHelp.