Ecrion Software Inc. Homepage
Forum Home Forum Home > XF Designer > Knowledge Database
  New Posts New Posts RSS Feed: Preserve Line Breaks from XML
  FAQ FAQ  Forum Search   Register Register  Login Login

Preserve Line Breaks from XML

 Post Reply Post Reply
Message / View First Unread Post
justinw View Drop Down
Admin Group
Admin Group

Joined: 08 Dec 2011
Posts: 199
Post Options Post Options   Quote justinw Quote  Post ReplyReply Direct Link To This Post Topic: Preserve Line Breaks from XML
    Posted: 14 Dec 2011 at 9:40am
Q:  Within my XML, I have some text that contains multiple line breaks that I wish to maintain in my output.  Is it possible to have these line breaks reflected in my output, and if so, how do I implement this in the Designer?

A:  Yes this is achievable in the TEXT view of the XF Designer, and the correct method is to use the attribute (linefeed-treatment="preserve") on the parent fo:block of where your field is inserted.  For example, if I have the following XML:

<car color="red">

I would want to use the following code in my template:

<fo:block linefeed-treatment="preserve">
<xfd:field xpath="/auto/car"/>

For more information on this usage, please visit:  


Edited by justinw - 14 Dec 2011 at 10:24am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz

This page was generated in 0.062 seconds.