Open rajko-furlan opened 3 months ago
@rajko-furlan and @contrext , the suggested fix partially works, but still we have issues on inline elements. We'll investigate this further.
@rajko-furlan, @contrext, the line should be changed to:
<xsl:if test="exists(. intersect $restricted-to) or ((self::text() or self::fo:inline) and exists(ancestor::fo:block[1] intersect $restricted-to))">
All kudos go to @rajko-furlan, I am just the messenger.
I've submitted the PR https://github.com/dita-community/org.dita-community.split-page-sequences/pull/10
When an fo:block contains mixed content, the text can be lost. Consider the following XML snippet:
<fo:block>Some text<fo:list-block>...
The text "Some text" will be dropped.
To fix this issue the in following template in split-page-sequences.xsl
Should be changed to
<xsl:if test="exists(. intersect $restricted-to) or self:text()">
That's because given how restricted-to is created exists(. intersect $restricted-to) may not pass for text nodes. In alternative, the could be changed to
<xsl:if test="exists(. intersect $restricted-to) or (self::text() and exists(.. intersect $restricted-to))">
to make it more restrictive, but I believe the additional exists is not necessary. It won't harm though :)