Question about the TOC in PDF2 output for bookmaps

Here should go questions about transforming XML with XSLT and FOP.
jnielsen
Posts: 58
Joined: Fri Sep 12, 2008 12:12 am

Question about the TOC in PDF2 output for bookmaps

Post by jnielsen »

When I transform one of my ditamaps in DITA to PDF2 it automatically creates the TOC but for a bookmap it does not. I traced the decision for creating the TOC to the toc_1.0.xsl file (in 'frameworks\dita\DITA-OT\demo\fo\xsl\fo') inside the <xsl:template name="createToc"> template. What do I need to change in my bookmap to get it to build a TOC? Currently my bookmap structure consists of several chapters with <topicref> children under it (no parts), although for testing purposes I also organized a bookmap with a nested structure of part->chapter->topicref. Am I missing some kind of tags for this? Any suggestions would be appreciated.

Thanks,

Josh
Radu
Posts: 9507
Joined: Fri Jul 09, 2004 5:18 pm

Re: Question about the TOC in PDF2 output for bookmaps

Post by Radu »

Hi Josh,

I understand that the PDF generated for the bookmap does not contain the "Table of contents" area.
Can you give us more details like the version of DITA Open Toolkit you are using, the version of Oxygen and also maybe a sample bookmap on which the problem can be reproduced?

http://www.oxygenxml.com/techSupport.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
jnielsen
Posts: 58
Joined: Fri Sep 12, 2008 12:12 am

Re: Question about the TOC in PDF2 output for bookmaps

Post by jnielsen »

Hello Radu,

Thank you for responding. I sent an e-mail with the details and some test files, but I will summarize the version info here. According to the relnotes.txt in the DITA-OT directory it is "DITA OT release 1.4.2.1" while the "About" window in Oxygen specifies 1.4.3. The Oxygen version is 10.2. The rest of the relevant information was in the e-mail.

Thanks,

Josh
Radu
Posts: 9507
Joined: Fri Jul 09, 2004 5:18 pm

Re: Question about the TOC in PDF2 output for bookmaps

Post by Radu »

Hi Josh,

From what is expected in the stylesheet you pointed out, it seems that your <frontmatter> should be specified like

Code: Select all

    <frontmatter>
<booklists>
<toc/>
</booklists>
</frontmatter>
Indeed, in this way, the stylesheet will generate the TOC for it even for your project.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
jnielsen
Posts: 58
Joined: Fri Sep 12, 2008 12:12 am

Re: Question about the TOC in PDF2 output for bookmaps

Post by jnielsen »

So if I understand this correctly, unlike the other PDF builds, for a bookmap I will need to specify manually with <toc> tags the topic titles and its structure (nested position, etc.)? If so are there any attributes of <toc> tags that I need to know about? And also, is that the traditional way bookmaps have done things for the TOC? Was it not possible to automate the TOC creation process like for a ditamap? I'm just wondering why there is a difference in behavior.

Lastly, would the tag structure look anything like this?:

Code: Select all

<toc name="Chapter 1">
<toc name="subtopic1"></toc>
<toc> name="subtopic2"></toc>
</toc>
Or is there only one set of <toc> tags with some other information between them?

Thanks,

Josh
jnielsen
Posts: 58
Joined: Fri Sep 12, 2008 12:12 am

Re: Question about the TOC in PDF2 output for bookmaps

Post by jnielsen »

Never mind, I figured it out. Sorry. I didn't figure it for being that easy, as just specifying <toc> and it creating it for you. Thanks for your help.

Josh
Post Reply