Editing order of TOC items #PDF


Hi everyone,

I am working on a customization for a PDF transform. I have added a couple elements to my DTD, namely <revisions/> and <revisionhighlights/>. These two elements use metadata from my bookmap and topics to create different revision history lists. I include these inside frontmatter in my bookmap, and there are interspersed with other topicrefs.

The issue I am having is that while I can get <revisions/> and <revisionhighlights/> to respect their order in the bookmap when processing the actual content, the TOC will not respect the order in the bookmap. Things I have tried:
  • setting args.bookmap-order to 'discard'
  • altering the main template inside toc.xsl to also grab these elements:
    • <xsl:template match="*[contains(@class, ' topic/topic ')] | *[contains(@class, ' bookmap/revisions ')] | *[contains(@class, ' bookmap/revisionhighlights ')]" mode="toc">
  • creating individual mode="toc" templates instead of using the union as above
In every case, the <revisions/> and <revisionhighlights/> elements seem to turn up at the beginning of the TOC ahead of any of the topics, despite the fact that they are clearly not in that order in the source bookmap nor are they in that order inside stage1.xml either.

I'm hoping someone can point me in the right direction. Thanks in advance for any and all assistance!