Adding line break in a PDF with XSL-FO?

Viewed 17437

Trying to create a PDF file based on an XML and a file using XMLSpy.

I'm trying to split a field into two lines based on the field content.

For example, if my varialbe = "John Doe AKA Johnny D", I want to view it like this :

John Doe

Johnny D

My problem is that I can't make it work even with all the samples on the net.

Here's my code :

     <xsl:value-of disable-output-escaping="yes" select="concat(substring-before(//MyField,'AKA'),$newline,substring-after(//MyField,'AKA'))" /> 
  </xsl:when>

So basically, eveytime I find the "AKA" string, I want to break the field into two lines. So my code, finds the string, create the new variable but still shows in one line. I've tried creating a variable with a blank line, using all kinds of techiniques but still shows in one line.

Any thoughts ?

2 Answers
Related