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: 72
Joined: Tue Oct 21, 2014 10:01 pm

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

Post 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
Costin
Posts: 828
Joined: Mon Dec 05, 2011 6:04 pm

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

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