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

Questions about XML that are not covered by the other forums should go here.
rdelong
Posts: 68

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

Tue Jan 16, 2018 11:11 pm

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
Costin
Posts: 434

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

Wed Jan 17, 2018 12:27 pm

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
Costin Sandoi
oXygen XML Editor and Author Support

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 0 guests