Hi Tobias,
a possible workaround for this bug is to wrap every text character in a
fo:character element and set its hyphenate attribute to false.
Here is a XSL example for doing that:
<xsl:template match="text()" mode="join">
<xsl:call-template name="doJoin">
<xsl:with-param name="text" select="string(.)"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="doJoin">
<xsl:param name="text"/>
<xsl:choose>
<xsl:when test="string-length($text) > 0">
<xsl:variable name="char" select="substring($text, 1, 1)"/>
<fo:character character="{$char}" hyphenate="false"/>
<xsl:call-template name="doJoin">
<xsl:with-param name="text" select="substring($text, 2)"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
I'd also advice to use latest trunk because 1.0 has a bug which causes a
NullPointerException when a white-space fo:character element is used as
the first element inside a fo:block. See also:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50988
HTH,
Matthias
On 14.04.2011 10:14, Tobias Rettstadt wrote:
Hi FOP experts,
I hope you can help me with my problem.
As I understand from the specification and previous posts, an inline with
keep-together.within-line="always" should prevent hyphenation of the
containing text by ensuring that it is rendered on the same line. But that
does not seem to work in my case:
http://old.nabble.com/file/p31396866/test.fo test.fo
http://old.nabble.com/file/p31396866/test.pdf test.pdf
The word hyphenation is hyphenated despite the keep-together attribute. The
results can be reproduced with version 1.0 and the trunk version. The
following hyphenation patterns were used:
http://sourceforge.net/projects/offo/
Did I miss something or is this a bug in FOP for which I should file a bug
reports?
Thanks in advance,
Tobias
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]