Conditional format processing of TOC in PDF
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 47
- Joined: Tue Feb 21, 2012 10:17 pm
Conditional format processing of TOC in PDF
Post by surangamas »
Hi, I've been scratching my head about this and could not find a solution. Basically what I want to do is this, I have a couple of DITA topic tiles (topic/title) that are formatted as <codeph> (Monospaced font, that is), and when I generate my PDF, I want the TOC entry for the topic title formatted by <codeph> to show in monospaced font, in another word, this is how I want my TOC to look like:
In DITA source doc:
<topic><title><codeph>Ping</codeph> request</title>
In the PDF output, I'd like to see the following:
Chapter 1.........
Ping request..............5
Where I want the bold "Ping" to show in monospaced font, but not the word "request", is this even possible?
I've tried to use exsl:node-set() to extract the navtitle element and apply conditional processing to it, or write a template that points to topic/title and apply conditional processing to it, none of these has worked. It seems to me that the text strings of topic titles in TOC are output from navtitle or spectitle to which no conditional formatting can be applied, am I correct in saying this? Any thought or input from anyone who had successfully gotten this to work is appreciated.
I am using oXygen 13.2 and RenderX XEP to generate PDFs, thanks.
In DITA source doc:
<topic><title><codeph>Ping</codeph> request</title>
In the PDF output, I'd like to see the following:
Chapter 1.........
Ping request..............5
Where I want the bold "Ping" to show in monospaced font, but not the word "request", is this even possible?
I've tried to use exsl:node-set() to extract the navtitle element and apply conditional processing to it, or write a template that points to topic/title and apply conditional processing to it, none of these has worked. It seems to me that the text strings of topic titles in TOC are output from navtitle or spectitle to which no conditional formatting can be applied, am I correct in saying this? Any thought or input from anyone who had successfully gotten this to work is appreciated.
I am using oXygen 13.2 and RenderX XEP to generate PDFs, thanks.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Conditional format processing of TOC in PDF
Post by sorin_ristache »
Hello,
Unfortunately that is not possible because XSL-FO does not allow that. The Table of Contents links from the PDF output are always generated as fo:bookmark/fo:bookmark-title elements in the XSL-FO file but a fo:bookmark-title element does not allow setting a font weight (bold in your case) on the contained text. Normally the font weight is set by surrounding the text with:
but that is not allowed inside fo:bookmark-title.
Regards,
Sorin
Unfortunately that is not possible because XSL-FO does not allow that. The Table of Contents links from the PDF output are always generated as fo:bookmark/fo:bookmark-title elements in the XSL-FO file but a fo:bookmark-title element does not allow setting a font weight (bold in your case) on the contained text. Normally the font weight is set by surrounding the text with:
Code: Select all
<fo:inline font-weight="bold">Ping</fo:inline>
Regards,
Sorin
-
- Posts: 47
- Joined: Tue Feb 21, 2012 10:17 pm
Re: Conditional format processing of TOC in PDF
Post by surangamas »
Hi Sorin, that's what I thought, thanks again.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service