Hello guys,
So I did a recursive named template with the code below and the line-breaks are
effectively transformed.
I still had the problem though but because my empty blocks were in a
<fo:inline> node.
I removed the inline node and now it's working!
Thanks a lot for your help!
For further reference:
[XSLT 1.0] [XSL-FO] [FOP 1.0] Fix for line-feed issue on page-break with
different page layouts (margin left and right)
- No <fo:block> inside <fo:inline>
- Replace line-feed 
 with  <fo:block/> with a recursive named
template
- Remove linefeed-treatment="preserve" and keep-together.within-page="always"
attributes
<xsl:template name="gReplaceLineBreak">
<xsl:param name="pString"/>
<xsl:choose>
<xsl:when test="substring-before($pString,'
')">
<xsl:value-of
select="substring-before($pString,'
')"/> <fo:block/>
<xsl:call-template name="gReplaceLineBreak">
<xsl:with-param name="pString"
select="substring-after($pString,'
')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$pString"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
From: Flynn, Peter <pflynn(_at_)ucc(_dot_)ie>
Sent: Monday, July 2, 2018 10:01 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [XSL-FO] Linebreaks on a page break (linefeed-treatment)
On 2018-07-02 08:31:06+01:00 Mathias Leclercq
mathias(_dot_)leclercq(_at_)biion(_dot_)com<mailto:mathias(_dot_)leclercq(_at_)biion(_dot_)com>
wrote:
Someone suggested me to replace linefeed characters in my text area with an
empty block <fo:block></fo:block>.
Problem is, I don't know what character to look for (xml is encoded in utf-8 on
a windows machine).
The numeric character entity 
 matches a newline, so
replace(textArea,'
[
]*','
') will replace all multiple newlines
with a single newline.
If you are constrained to using XPath 1.0, you could write a recursive named
template to do the job, testing for two newlines each time, and replacing with
one, until no double newlines are left, then emitting an <fo:block/>
///Peter
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--