prevent page break between topic title and topic content

Here should go questions about transforming XML with XSLT and FOP.
Posts: 6

prevent page break between topic title and topic content

Mon Mar 06, 2017 5:49 pm


in my PDF transformation I want to keep the topic title with the topic content, and not have the transformation insert a page break between them when the topic title would be rendered at the bottom of a page, but put the title at the top of the next page, together with the content.

I created a custom plugin and have inserted the following in the file commons-attr.xsl for the topic.title attribute set and all other attribute sets that format topic titles (topic.topic.title, topic.topic.topic.title, etc.):

Code: Select all

<xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>

However the title is still rendered at the bottom of a page and the topic content on the next page.

I'm using Oxygen Editor 18.1 with DITA OT 2.3.3.

Can you please let me know what else I need to change to have the title and topic content appear together, without a page break inbetween?

Posts: 329
Location: Craiova

Re: prevent page break between topic title and topic content

Thu Mar 09, 2017 9:45 am


Setting the property keep-with-next.within-page=always should be enough to tell the XSL-FO processor to keep the topic title within the same page with its content.

You can verify if your customization was applied by setting the clean.temp="no" transformation parameter. This parameter will instruct the transformation to not clean the temporary folder, so you can analyse the file from this folder at the end of the transformation.

This temporary file represent the input of the XSL-FO processor and it should contain the keep-with-next.within-page=always property.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 0 guests