cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <>
Subject Re: linebreaks in esql:get-string
Date Fri, 11 Apr 2003 07:51:51 GMT
On 10.Apr.2003 -- 10:00 PM, Bj?rn Voigt wrote:
> Hello cocooners,
> i use a cocoon2.1-dev version from march, esql and a mysql dbms,
> and I try to query some text-data within a xsp-page. The text in the 
> table includes some linebreaks for text formating. If I use the string
> in a xform-textarea, the linebreaks are displayed correctly, but if
> I use a esql-query//esql:get-string or get-ascii, the result contains no 
> line breaks. What steps I have to do, to display the text correct with
> line breaks?

This is difficult since HTML ignores \n outside of <textarea/> and
<pre/>. Thus you need to replace them with <br/>s. Plus because those
<br/>s need to generate SAX events, it is not sufficient to include
them as string. Therefore you need to create an XML document from your
string and include that e.g. using the util.xsl logicsheet. If the
DBMS returns XML documents (maybe your DBMS provides string
concattenation and string replace that could be used here?),
<esql:get-xml/> would do as well.

C h r i s t i a n       H a u l
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message