I'm struggling with my xsl:fo (Apache Fop 1.1). I'm trying to generate a Block with inline images and inline text elements which might contain newline characters.
<fo:block>
<fo:inline>First Line Second Line, Image: </fo:inline>
<fo:inline>
<fo:external-graphic scaling="non-uniform" content-height="scale-to-fit" content-width="4mm" height="4mm" src="data:image;base64,iVBORw0KGgoAAAANSUhEUgAAAGcAAABfCAIAAAB6Ck5uAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA0SURBVHhe7cGBAAAAAMOg+VNf4QBVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHCoAXMKAAFau+l4AAAAAElFTkSuQmCC"/>
</fo:inline>
<fo:inline> some more Text on Line 2 3rd Line</fo:inline>
</fo:block>
I expect the output would be
FirstLine
SecondLine, Image: || some more Text on Line 2
3rd Line
what I get is:
FirstLine SecondLine, Image: || some more Text on Line 2 3rd Line
I've been playing a while now with the following attributes on the fo:block element and/or the fo:inline elements giving strange or unexpected results.
white-space-collapse="false"
white-space-treatment="preserve"
linefeed-treatment="preserve"
Any suggestions?
Edit 1: Changing the inline elements into blocks like this
<fo:block white-space-treatment="ignore">
<fo:block white-space="pre">First Line
Second Line, Image: </fo:block>
<fo:block>
<fo:external-graphic scaling="non-uniform" content-height="scale-to-fit" content-width="4mm" height="4mm" src="data:image;base64,iVBORw0KGgoAAAANSUhEUgAAAGcAAABfCAIAAAB6Ck5uAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA0SURBVHhe7cGBAAAAAMOg+VNf4QBVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHCoAXMKAAFau+l4AAAAAElFTkSuQmCC"/>
</fo:block>
<fo:block white-space="pre"> some more Text on Line 2 3rd Line</fo:block>
</fo:block>
gives me the expected wrapping within the elements, but a new line is generated for each block which isn't what I'm trying to archive.