Thanks you for your answers Actually I afraid I did not ask my question clearly enough. The @value which is the content of an XML File's element which contains a String. This String has to be formatted (a little bit if possible :-) ) with new lines. So that the text:
Mister T"NewLineChar"Hannibal Smith"NewLineChar"Looping Where "NewLineChar" should be the expected character After rendering FOP will look like in PDF format to: Mister T Hannibal Smith Looping Is it possible? Or should I find a way to use multiple blocks? Thank you. Miroslav -----Original Message----- From: Abel Braaksma [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 13, 2007 10:14 AM To: fop-users@xmlgraphics.apache.org Subject: Re: XSL - NewLine Just use: <xsl:text> </xsl:text> or <xsl:text>
</xsl:text> You can also add an entity to your doctype if you tend to use this kind of newlines more often: <!ENTITY newline "&#x0D;&#x0A;" > and use it as follows: <xsl:text>&newline;</xsl:text> which will be rendered as a \r\n by the serializer. Of course, you could also use an xsl:variable to do the same. Why do you want a \r *and* a \n? Because if you output XML (which you do: XSL-FO) the serializer will make sure that all \r\n will become \n. Which means that <xsl:text>
</xsl:text> is semantically equivalent with: <xsl:text>
</xsl:text> which means that the newline entity definition will do exactly the same when defined thus: <!ENTITY newline "&#x0A;" > (not so when you output as text, but that is another story) If you *have* to have both the \r and the \n in the serialized output (I have no idea why, I think you don't) then your only bet is XSLT 2.0 which allows you to put in late-serialization replacements with xsl:character-map. Cheers, -- Abel Braaksma Gregan, Miroslav wrote: > Hello all, > > I need to put manually new line in a pdf document and it has to be for > the @value field. > I know, to put a new line I should use a new block, but Is it possible > to put some kind of "\r\n" string into the value to format it? > > <fo:block hyphenate="true" font-size="10pt" font-weight="bold"> > <xsl:value-of select="@value"/> > </fo:block> > > This XSL document is used to convert an XML document to PDF with > either FOP 0.20.5 or 0.93 used embedded in a java 5.0 code. > > Thank you for your help. > > Kind regards, > > Miroslav Gregan > > Siemens PSE-SK KB SK2 > Dubravska cesta 4 > 84104 Bratislava > Slovakia > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]