You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Dipl.-Oec. Harald Meyer" <me...@cybay.de> on 2003/04/29 17:40:27 UTC

Newbie question about line breaks

Hello everyone,

I have a question about line breaks (maybe too simple for some of you ;-)).

My XML:
...
<data>
	<value>here
is
my
text</value>
</data>
...

I want to keep the line breaks in my PDF output. But how do I have to say
that in XSL:FO???

Thanks
Harald



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


AW: Newbie question about line breaks

Posted by "Dipl.-Oec. Harald Meyer" <me...@cybay.de>.
Thanks, this helps! :-)

> -----Ursprungliche Nachricht-----
> Von: Toufic Nehme [mailto:toufic.nehme@canadair.ca]
> Gesendet: Dienstag, 29. April 2003 19:17
> An: fop-user@xml.apache.org
> Betreff: Re: Newbie question about line breaks
> 
> 
> Add this in your fo:block
> 
> white-space-collapse="false"  linefeed-treatment="preserve"
> white-space-treatment="preserve"
> 
> Hope this helps.
> 
> "Dipl.-Oec. Harald Meyer" wrote:
> 
> > Hello everyone,
> >
> > I have a question about line breaks (maybe too simple for some 
> of you ;-)).
> >
> > My XML:
> > ...
> > <data>
> >         <value>here
> > is
> > my
> > text</value>
> > </data>
> > ...
> >
> > I want to keep the line breaks in my PDF output. But how do I 
> have to say
> > that in XSL:FO???
> >
> > Thanks
> > Harald
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> > For additional commands, e-mail: fop-user-help@xml.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
> 
> 


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


Re: Newbie question about line breaks

Posted by Toufic Nehme <to...@canadair.ca>.
Add this in your fo:block

white-space-collapse="false"  linefeed-treatment="preserve"
white-space-treatment="preserve"

Hope this helps.

"Dipl.-Oec. Harald Meyer" wrote:

> Hello everyone,
>
> I have a question about line breaks (maybe too simple for some of you ;-)).
>
> My XML:
> ...
> <data>
>         <value>here
> is
> my
> text</value>
> </data>
> ...
>
> I want to keep the line breaks in my PDF output. But how do I have to say
> that in XSL:FO???
>
> Thanks
> Harald
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org




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


Re: Newbie question about line breaks

Posted by Clay Leeds <cl...@medata.com>.
Harald,

That's not too simple for me! It looks like you need to set the
white-space-collapse="false".

<fo:block white-space-collapse="false">
  <xsl:value-of select="//data/value"/>
</fo:block>

Hope this helps!

;-p

Dipl.-Oec. Harald Meyer wrote:
> Hello everyone,
> 
> I have a question about line breaks (maybe too simple for some of you ;-)).
> 
> My XML:
> ...
> <data>
> 	<value>here
> is
> my
> text</value>
> </data>
> ...
> 
> I want to keep the line breaks in my PDF output. But how do I have to say
> that in XSL:FO???
> 
> Thanks
> Harald


-- 
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc


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


AW: Newbie question about line breaks

Posted by "Dipl.-Oec. Harald Meyer" <me...@cybay.de>.
> See:
> http://xml.apache.org/fop/fo.html#fo-preformat
>
> Also, there are Unicode paragraph separator (U+2029) and line separator
> (U+2028) characters that can be used for this purpose if you place them in
> XML. Don't hold me to this, but I think they work in FOP.
>
> Victor Mote


The separators didn't fit in my case because the text is from a database
request.
For hardcoded text it may be useful...



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


RE: Newbie question about line breaks

Posted by Victor Mote <vi...@outfitr.com>.
Harald Meyer wrote:

> I want to keep the line breaks in my PDF output. But how do I have to say
> that in XSL:FO???

See:
http://xml.apache.org/fop/fo.html#fo-preformat

Also, there are Unicode paragraph separator (U+2029) and line separator
(U+2028) characters that can be used for this purpose if you place them in
XML. Don't hold me to this, but I think they work in FOP.

Victor Mote


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