I haven't used RH9, but in previous versions the TOC does not determine what is included in the output, only what displays in the TOC itself.
From the help, it looks like the "Exclude unreferenced topics from output" setting only affects search results, rather than output content:
"Excluding unreferenced topics from search - The Exclude Unreferenced Topics From Output option in layout properties ensures that search results are displayed only from topics that are referenced in the following project components:
- Browse sequences
- Default topic
- CSH map IDs
- See Also keywords
- Related Topics keywords
The conditional tags combined with the SSL build expression determine what is generated as part of each target. So I believe you need to use conditional tags on all your topics, and apply the appropriate build expressions for each target to prevent unwanted content appearing in the output folders.
"Exclude unreferenced topics from output" starts by excluding topics that are not in the TOC etc. However if a topic in the TOC has a link to a topic that is not in the TOC, the linked topic will also be included to avoid a broken link. It also daisy chains so that if the second topic has further links, that too gets included.
The idea behind this option was that people wanted TOC only outputs but Adobe chose to implement it in this way. I can see why but I take the view that if that results in broken links, that is the author's responsibility. If you agree, then please follow this link and ask for true TOC based authoring.
Meantime you will, as Amebr points out, need to create build tags and expressions. There is a page on my site that covers that.
See www.grainge.org for RoboHelp and Authoring tips
This explains it. It took over 19 hours for my project to FTP because of the excess files.
Thanks Peter and Amber for your feedback. I will definitely create the feature request.