xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas L Delmelle <a_l.delme...@pandora.be>
Subject Re: linebreak fop0.94
Date Wed, 07 Nov 2007 17:02:38 GMT
On Nov 7, 2007, at 16:20, Andreas Siepert wrote:


> Isn't there another way?

Sorry, I don't think so...

The only way to get a guaranteed linebreak is either:
* start a new fo:block
* specify linefeed-treatment='preserve' on the containing block, and  
use linefeed characters

> Like you suggested, I would have to write my fo stuff into a single  
> line, otherwise there will be lots of additional linefeeds.

Well, this is generally how serialized FO reaches FOP (no indents).

If you use XSLT to generate the FO, specify no indent="yes" on the  
xsl:output element and do not use xsl:preserve-space in your  
stylesheet, then any compliant XSLT processor should output an XML  
document that has all content on one line (unless, of course the  
input contains text() nodes with 'significant' linefeeds...)

If you use XSLT, it would thus not really matter, since this very  

<xsl:template match="somenode">
   <fo:block linefeed-treatment="preserve">
       <xsl:value-of select="othernode" />
       <xsl:text>&#x0A;and a linefeed</xsl:text>
     More text

Causes the following, very processor-friendly FO output (if using no  
special output options, and using default XSLT whitespace stripping):

<fo:block linefeed-treatment="preserve"><fo:inline>{content of  
othernode, possibly including linefeeds that will be preserved} 
&#x0A;and a linefeed</fo:inline>More text</fo:block>

Note: The above should be a single line. Any linebreaks appearing,  
apart from the numeric character reference, will be a result of line- 
wrapping elsewhere.



To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message