pagebreak before element identified with attribute
Posted: Tue Oct 09, 2018 3:43 pm
Hi,
I am trying to identify an element by attribute and then add a pagebreak before. Right now I can identify the element and the pagebreak works but the element is removed. I managed to copy the content with <xsl:copy-of but the formatting is not applied. Is there some option to add the formatting by calling the title formatting? I already tried to create a new <title> element inside the template node but nothing is created when doing this.
The following example results in a pagebreak but without the formatting of the title:
Thanks a lot in advance!
I am trying to identify an element by attribute and then add a pagebreak before. Right now I can identify the element and the pagebreak works but the element is removed. I managed to copy the content with <xsl:copy-of but the formatting is not applied. Is there some option to add the formatting by calling the title formatting? I already tried to create a new <title> element inside the template node but nothing is created when doing this.
The following example results in a pagebreak but without the formatting of the title:
Code: Select all
<xsl:template match="//title[@formatting='pageBreakBefore']">
<fo:block page-break-before="always"/>
<xsl:copy-of select="node()"/>
</xsl:template>
Code: Select all
<title formatting="pageBreakBefore">Some Title</title>