Pages: 1
Print
Author Topic: Table of Contents PDF Output  (Read 2201 times)
thekilla20
Member

Posts: 5


« on: July 09, 2013, 09:37:13 AM »

Hello,

I'm generating my pdf output from a dita general topic using Xmetal enhanced pdf via render x and my table of contents and bookmarks are being improperly generated.

I'm seeing that the table of contents and bookmarks are being generated only based on the title (topic/title) that I have in my xml file and I'm trying to have them based off of the sections (topic/body/section) in my document.

I tried modifying the xm_bookmarks.xs filel on line 49 (in the C:\Program Files (x86)\Common Files\XMetaL Shared\DITA_OT\plugins\xmfo\Customization\fo\xsl folder) by changing:

<xsl:for-each select="child::*[contains(@class,' topic/title ')]">

 to

<xsl:for-each select="child::*[contains(@class,' topic/body/section')]">


but that does not work.

Any help would be much appreciated.
Logged
severin.foreman
Member

Posts: 47



« Reply #1 on: July 09, 2013, 10:28:48 AM »

Sections are not designed to contribute to navigation. There have been several discussions about it on the Yahoo dita-users list. The recommended DITA best practice is to use topics nested in maps, or alternately topics nested within other topics.

Your XPath expression below doesn't select anything because there is no element where the class attribute contains "topic/body/section". You could try something like this, but I cannot say whether it will work, because I don't know the complete context of where you are using your custom code.

<xsl:for-each select="*[contains(@class, ' topic/section ')]/*[contains(@class, ' topic/title ')]">

Regards,
Severin

Logged
thekilla20
Member

Posts: 5


« Reply #2 on: July 10, 2013, 07:31:51 AM »

Thank you,

I do have one inquiry though, when you mean topics nested in topics say I have

<topic>
     <body>
          <section>content</section>
    </body>
</topic>


Would that be considered a nested topic? Or would it require having <section> being tagged as <topic>? I ask because I noticed the topleaf plugin itself does create a table of contents based on sections.
Logged
Pages: 1
Print
Jump to: