We don't encountered a similar request until now, so I can't give you precise instruction about this request.
As you already found, you need to modify the functionality from 'toc.xsl' stylesheet. This is the stylesheet that contains templates used to produce the PDF TOC. Of course, in order to override the templates from 'toc.xsl' you need a PDF customization plugin that will contribute a customization stylesheet.
Now, about the changes you have to make in your customization stylesheet. I think you can inspire from the next template from toc.xsl:
Code: Select all
<xsl:template match="*[contains(@class, ' topic/topic ')]" mode="toc">
that is used to produce an entry in TOC for each topic. Did you try to modify this template to handle also the sections?
Also, in order to develop your changes in this stylesheet, my advice is to instruct the DITA-OT processor to not clean the temporary directory produced by the PDF transformation(set the 'clean.temp' parameter to 'no'). After, you run the transformation once, you can open the 'temp/dita_map_MERGED.xml' and investigate it's content.
However, for this kind of request it is better to use the DITA users list http://dita.xml.org/dita-users
. This mailing list is monitored by many DITA consultants that can offer you good advice.