PDF transform of single topic from map
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 32
- Joined: Wed Aug 16, 2017 8:07 pm
PDF transform of single topic from map
I am working on writing a PDF plugin to take a single release notes topic from a large ditamap (not bookmap) and output it as a PDF.
I had 2 thoughts of either transforming on the map and having it only output the one topic, or if choosing the specific release notes topic and transforming on it. I started testing against just the one topic because I thought that might be an easier project, but I have questions.
1) Do you think the publishing the single topic vs the logic of parsing it from the map is the way to go or do you recommendations on going about that?
2) Going the route of the single topic, I am running into problems of keyrefs not being populated. Is there a way to include them or point to the container file for them?
3) Also doing the single topic, it’s looking for a Book Title to put in the header, which it just populates with Book Title as it’s undefined.. I want to change the header and footer completely to be specific for standalone release notes and not like part of a manual. In the static-content.xsl I see templates for a bunch of different header and footer info. Is there a way to figure out which ones would adjust that and how many places I will need to change it?
Sorry for all of the questions - any specifics or just the direction to go in would help.
Thanks!
Kim
I had 2 thoughts of either transforming on the map and having it only output the one topic, or if choosing the specific release notes topic and transforming on it. I started testing against just the one topic because I thought that might be an easier project, but I have questions.
1) Do you think the publishing the single topic vs the logic of parsing it from the map is the way to go or do you recommendations on going about that?
2) Going the route of the single topic, I am running into problems of keyrefs not being populated. Is there a way to include them or point to the container file for them?
3) Also doing the single topic, it’s looking for a Book Title to put in the header, which it just populates with Book Title as it’s undefined.. I want to change the header and footer completely to be specific for standalone release notes and not like part of a manual. In the static-content.xsl I see templates for a bunch of different header and footer info. Is there a way to figure out which ones would adjust that and how many places I will need to change it?
Sorry for all of the questions - any specifics or just the direction to go in would help.
Thanks!

-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: PDF transform of single topic from map
Hi Kim,
Please see some answers below:
There is an issue registered for this:
https://github.com/dita-ot/dita-ot/issues/1697
As a possible workaround in Oxygen 20.1 we added in the main DITA menu an action called "Replace all references with content" which can be called on a topic to expand all its key references or content references. Then you can save the topic, publish and then undo it back.
Regards,
Radu
Please see some answers below:
Problem is that the single topic might not be standalone, it may have various conrefs, keyrefs or hrefs to other topics as you also discovered.1) Do you think the publishing the single topic vs the logic of parsing it from the map is the way to go or do you recommendations on going about that?
The publishing engine does not have a processing mode in which you could process one topic but state that you want the keys to be resolved based on a certain DITA Map.2) Going the route of the single topic, I am running into problems of keyrefs not being populated. Is there a way to include them or point to the container file for them?
There is an issue registered for this:
https://github.com/dita-ot/dita-ot/issues/1697
As a possible workaround in Oxygen 20.1 we added in the main DITA menu an action called "Replace all references with content" which can be called on a topic to expand all its key references or content references. Then you can save the topic, publish and then undo it back.
Maybe you can have two PDF customization plugins with two different transtypes, one for single topic publishing and one for map publishing.3) Also doing the single topic, it’s looking for a Book Title to put in the header, which it just populates with Book Title as it’s undefined.. I want to change the header and footer completely to be specific for standalone release notes and not like part of a manual. In the static-content.xsl I see templates for a bunch of different header and footer info. Is there a way to figure out which ones would adjust that and how many places I will need to change it?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 32
- Joined: Wed Aug 16, 2017 8:07 pm
Re: PDF transform of single topic from map
Hi Radu! I met you at LavaCon Portland last year - it's great to "see" you again.
Thanks for the quick response. That's a nice workaround for resolving the keys.
Thanks again for all of your help!
Kim
Thanks for the quick response. That's a nice workaround for resolving the keys.
The two different PDF plugins is exactly the route I am trying to go. We already have the one for map publishing, extended from PDF2. I created the second, for single topic publishing, and copied over its files to retain the styling and start from there. I'm trying to find which templates and files I need to modify to adjust the headers and footers for this single topic one.Maybe you can have two PDF customization plugins with two different transtypes, one for single topic publishing and one for map publishing.
Thanks again for all of your help!
Kim
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: PDF transform of single topic from map
Hi,
In the XSLT stylesheet "DITA-OT\plugins\org.dita.pdf2\xsl\fo\static-content.xsl" there are a lot of templates called something like "insertBodyOddFooter". You probably need to find out which one to override in your customization.
Regards,
Radu
In the XSLT stylesheet "DITA-OT\plugins\org.dita.pdf2\xsl\fo\static-content.xsl" there are a lot of templates called something like "insertBodyOddFooter". You probably need to find out which one to override in your customization.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
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