Maybe a little hack in the SQLTransformer ?
Or maybe XSL can be helpfull with this...

Derek Hohls wrote:

I am not sure he was using XSP - the orginal message refers
to the "SQL Transformer" (supposed to be the preferred approach
for database ineraction - as opposed to XSP).   How could the
code below be implemented in the Cocoon framework in such an
instance??

Derek

** "Who is considering abandoning XSP but cannot really see how
to handle complex DB interaction without it ?! **


[EMAIL PROTECTED] 2004/05/18 05:54:22 PM >>>

To get an idea !!

<form:column> <xsp:logic>
doSplit(mychangeticket.core.getProperty("LongDescription").getFormatted(),
"\\\n", xspAttr);
<xsp:content>
<br/><br/>
</xsp:content>
</xsp:logic>
</form:column>



private void doSplit(String text, String sepregexp, AttributesImpl xspAttr) throws Exception { String[] lines = text.split(sepregexp); for (int i = 0; i &lt; lines.length; i++) { <xsp:content> <xsp:expr>lines[i]</xsp:expr> </xsp:content> if (i != lines.length -1) { <br/> } } }

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] Behalf Of Olivier Billard
Sent: 18mm2004 17:45
To: [EMAIL PROTECTED] Subject: Re: Query wrt rows returned from a database???



Hi Sam,

HTML code doesn't care about "carriage returns"
You should retrive your content in a String, split it with the '\n' character, iterate through the array, adding <br/> to the content between each element of the array.


Sam wrote:

Hello Everybody,

I am still waiting to get a reply back for my query. Would be great

if someone answers this.

Thanks !!!


On Mon, 17 May 2004 Sam wrote :


Hi List...

I can retreive rows from a MySQL database with no problems, only that

the rows returned have no newline character, ie the SQL transformer ignores or escapes (I am not sure) the newline characters and I get rows fetched from the database as one single line.

Now how do I keep the newline character after every row that is been

fetched through SQL transformer so that I can display it on the browser in a nice table format ???

Does anybody know why & how can I avoid that ???

Regards


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



Reply via email to