Page 1 of 1

HTML5 (OT 2.5.2) restricting Nav output to a single chapter

Posted: Tue Jan 16, 2018 11:11 pm
by rdelong
I'm extending the html5 transform from the OT 2.5.2 and I'm having trouble figuring out how to restrict the output of the full navigation to only the current chapter.

I know that this is done by extending the org.dita.html5\xsl\nav.xsl file, but I can't figure out how to direct the xpath to select the current chapter and not everything in the book. I'm expecting to find a place where I can specify something like,

Code: Select all

 ancestor::chapter[position()=2]
, for example for chapter 2.

I want to produce output for the entire bookmap, but have the navigation show for only the current chapter for each topic output.

Can someone help with this?

Thanks,
Rick

Re: HTML5 (OT 2.5.2) restricting Nav output to a single chapter

Posted: Wed Jan 17, 2018 12:27 pm
by Costin
Hello,

The HTML transformation scenario comes from the DITA OT as is. As we did not customize that scenario, it is not possible to choose what content should the Table Of Contents include in the resulted output.

In case you need to have this possibility, you should use the "DITA Map WebHelp Responsive" scenario instead of the HTML5 scenario, as we fully support it and, beside other useful parameters, we've added a "webhelp.side.toc.links" parameter available in the "Parameters" tab of the DITA Map WebHelp Responsive configuration dialog that you could use to specify which links should the side TOC contain.

The allowed values are: "topic", "chapter" and "all". In you case, you should choose "chapter".

Regards,
Costin