Gregan, Miroslav wrote:
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?

Your question seemed to be about how to insert line breaks in XML. If you want to introduce newlines in the rendered PDF, there is no use whatsoever to use line breaks the way we explained to you, because this is treated as whitespace and handled accordingly by FOP (or any xsl-fo processor for that matter).

Most likely you just want to use <fo:block>...

I do not understand why you want an attribute to contain \r\n as it whitespace has no influence on the rendering process. Perhaps you mean it the other way around: your source document contains some attribute with newlines in it and you want these newlines to be turned into <fo:block />. This is then an XSLT question and the answer depends on what version you use. In XSLT 2 you can do the following:

<xsl:for-each select="tokenize(@your-attribute, '\n')">
   <fo:block><xsl:value-of select="." />
   ....etc
</xsl:for-each>

Your best bet for this kind of questions is the XSLT list at mulberry tech's: http://www.mulberrytech.com/xsl/xsl-list/index.html.

Cheers,
-- Abel Braaksma
  http://xslt.metacarpus.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to