Subject: Re: Not want Space between inlines

On 09 Feb 2009, at 17:41, Michonska Sylvie wrote:


I use a style sheet to transform my XML to FO :
For an paragraph, i build a fo:block with some inlines,
each inline contents differents attributs (different font, different color or/and ..)

A small hint:
If you can, try to use fo:wrapper instead of fo:inline. That's much less of a drain on resources. This is only possible if you do NOT need non-inheritable properties (like border or padding, for example) or special alignment-adjust.
For inheritable properties like font-* and color, fo:wrappers work just as well, but they are much more light-weight than fo:inlines.

[Note to self: should REALLY add this remark to the performance hints on the site. Can have a significant impact in larger documents.]

With FOP 0.94, in my PDF, the inlines are separate by a space (between each inline).
I don't want this space.
Before, with FOP 0.20.5, the same fo:block and some fo:inline don't product these spaces.

As Jeremias already noted: very difficult to judge without looking at the FO file, but it is very likely that the undesirable white-space is actually a result of the built-in template rule for text() being triggered somewhere (so actually comes from the source XML).

Overriding that built-in template rule in your stylesheet, like so:

<xsl:template match="text()">
<xsl:value-of select="normalize-space(.)" />

Could mean that you don't even need special FO attributes, as it will already filter out this unwanted white-space at the XSLT stage, so FOP doesn't even see it.



To unsubscribe, e-mail: fop-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: fop-users-help@xxxxxxxxxxxxxxxxxxxxxx