xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Diepstraten / media access <Joachim.Diepstra...@media-access.net>
Subject RE: Line-breaks?
Date Fri, 05 Jan 2001 08:27:57 GMT
Hi Belinda

>Mm. I hadn't noticed that before. Well, I only get that sometimes. See this

I'll get it all the time. First I thought maybe it's a problem as &#0xD is
CR and LF. So I tried &#0xA which is
the unixcode but the result was the same. Then I had a closer look at the
PDF and the first character of this
line really starts at a different position as the first character of the
line before. (Hmm could this be a bug?
Or is that the suitable behaviour?). After serveral more hours I came up
with this workarround :

<xsl:template match="block">
	<xsl:variable name="test">
		<xsl:value-of select="."/>
	<xsl:variable name="test2">
		<xsl:value-of select="substring-before($test,'#b#')"/>
	<xsl:variable name="test3">
		<xsl:value-of select="substring-after($test,'#b#')"/>
	<fo:block end-indent="7.2cm" text-align="start"
	<xsl:if test="not(contains($test,'#b#'))">
		<xsl:value-of select="."/>
	<xsl:if test="contains($test,'#b#')">
		<xsl:value-of select="$test2"/>
		<xsl:call-template name="forceLineBreak"/>		
		<xsl:value-of select="$test3"/>		  	     

<xsl:template name="forceLineBreak">
	<fo:block end-indent="18.0cm"

Interestingly enough I have to include the code in a template. When I place
the line

	<fo:block end-indent="18.0cm"

directly inside the second if statement nothing happens? Any reason why?

Your sincerly,

View raw message