How to display TocFirstHeader, TocFirstFooter
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 16
- Joined: Thu Dec 10, 2020 11:00 am
How to display TocFirstHeader, TocFirstFooter
I use:
oXygen XML Editor 22.1, build 2020100710
transformation scenario - DITA Map PDF - based on XSL-FO
customization directory - according to oXygen's instructions
I need to display TocFirstHeader, TocFirstFooter (together with TocOddHeader and TocOddFooter) in my pdf.
I've done
in my custom.xsl
in my layout-masters.xsl
<fo:simple-page-master master-name="toc-first" xsl:use-attribute-sets="simple-page-master">
<fo:region-body xsl:use-attribute-sets="region-body.odd"/>
<fo:region-before region-name="first-toc-header" xsl:use-attribute-sets="region-before"/>
<fo:region-after region-name="first-toc-footer" xsl:use-attribute-sets="region-after"/>
</fo:simple-page-master>
But it doesn't work: I have standard Toc Odd Header and Footer in my pdf without FirstTocHeader and Footer.
What I did wrong, please explain?
oXygen XML Editor 22.1, build 2020100710
transformation scenario - DITA Map PDF - based on XSL-FO
customization directory - according to oXygen's instructions
I need to display TocFirstHeader, TocFirstFooter (together with TocOddHeader and TocOddFooter) in my pdf.
I've done
in my custom.xsl
Code: Select all
<xsl:template name="insertTocStaticContents">
<xsl:call-template name="insertTocOddFooter"/>
<xsl:if test="$mirror-page-margins">
<xsl:call-template name="insertTocEvenFooter"/>
</xsl:if>
<xsl:call-template name="insertTocOddHeader"/>
<xsl:if test="$mirror-page-margins">
<xsl:call-template name="insertTocEvenHeader"/>
</xsl:if>
[b] <xsl:call-template name="insertTocFirstHeader"/>
<xsl:call-template name="insertTocFirstFooter"/>[/b]
</xsl:template>
[b]<xsl:template name="insertTocFirstHeader">
<fo:static-content flow-name="first-toc-header">
<fo:block xsl:use-attribute-sets="__body__first__header">
<fo:block text-align="center">
TEST_FIRST_TOC_HEADER
</fo:block>
</fo:block>
</fo:static-content>
</xsl:template>
<xsl:template name="insertTocFirstFooter">
<fo:static-content flow-name="first-toc-footer">
<fo:block xsl:use-attribute-sets="__body__first__header">
<fo:block text-align="center">
TEST_FIRST_TOC_FOOTER
</fo:block>
</fo:block>
</fo:static-content>
</xsl:template>
[/b]
<fo:simple-page-master master-name="toc-first" xsl:use-attribute-sets="simple-page-master">
<fo:region-body xsl:use-attribute-sets="region-body.odd"/>
<fo:region-before region-name="first-toc-header" xsl:use-attribute-sets="region-before"/>
<fo:region-after region-name="first-toc-footer" xsl:use-attribute-sets="region-after"/>
</fo:simple-page-master>
But it doesn't work: I have standard Toc Odd Header and Footer in my pdf without FirstTocHeader and Footer.
What I did wrong, please explain?
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to display TocFirstHeader, TocFirstFooter
Hi,
A couple of years ago we added support to publish DITA content to PDF using CSS to style the output PDF.
Using CSS it's quite easy to customize the headers and footers:
https://www.oxygenxml.com/doc/versions/ ... oters.html
You seem to be using the classic PDF approach of using XSLT to customize the XSL-FO. Officially we no longer provide technical support for this but maybe if you write us an email (support@oxygenxml.com) and attach the entire customization folder I could try to take a look at it.
If you want to debug this further on your side, in the transformation scenario you can set the parameter "clean.temp" to "no". Then after publishing look in the transformation temporary files folder and search for a file named "topic.fo", open this XSL-FO file in Oxygen and try to see if your changes have been integrated in there.
You can also try to ask around on the public DITA Users List, again maybe attach the entire customization folder.
Regards,
Radu
A couple of years ago we added support to publish DITA content to PDF using CSS to style the output PDF.
Using CSS it's quite easy to customize the headers and footers:
https://www.oxygenxml.com/doc/versions/ ... oters.html
You seem to be using the classic PDF approach of using XSLT to customize the XSL-FO. Officially we no longer provide technical support for this but maybe if you write us an email (support@oxygenxml.com) and attach the entire customization folder I could try to take a look at it.
If you want to debug this further on your side, in the transformation scenario you can set the parameter "clean.temp" to "no". Then after publishing look in the transformation temporary files folder and search for a file named "topic.fo", open this XSL-FO file in Oxygen and try to see if your changes have been integrated in there.
You can also try to ask around on the public DITA Users List, again maybe attach the entire customization folder.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 16
- Joined: Thu Dec 10, 2020 11:00 am
Re: How to display TocFirstHeader, TocFirstFooter
Hi!
Thank you for the advice.
the following additional changes in layout-masters.xsl helped me to solve my problem^
Thank you for the advice.
the following additional changes in layout-masters.xsl helped me to solve my problem^
Code: Select all
<xsl:template name="generate-page-sequence-master">
....
<xsl:if test="$first">
<fo:conditional-page-master-reference master-reference="{$master-reference}-first"
odd-or-even="first"
page-position="first"/>
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