Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 14935 invoked from network); 4 Nov 2003 22:57:40 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 4 Nov 2003 22:57:40 -0000 Received: (qmail 72319 invoked by uid 500); 4 Nov 2003 22:55:43 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 72270 invoked by uid 500); 4 Nov 2003 22:55:43 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 72210 invoked from network); 4 Nov 2003 22:55:42 -0000 Received: from unknown (HELO mf2.bredband.net) (195.54.106.37) by daedalus.apache.org with SMTP; 4 Nov 2003 22:55:42 -0000 Received: from digitalfarmers.com ([213.113.112.93]) by mf2.bredband.net with ESMTP id <20031104225548.QUTO28253.mf2@digitalfarmers.com> for ; Tue, 4 Nov 2003 23:55:48 +0100 Message-ID: <3FA82E74.6090800@digitalfarmers.com> Date: Tue, 04 Nov 2003 23:55:48 +0100 From: Anders Forsgren User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: XSP/ESQL escaping References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Sigh :( Feels like a lot of work to make a linebreak a
tag...If I rephrase the question: What would be the simplest way of displaying the database strings with correct linebreaks in html (except using
 in the xsl)?

thanks

Anders


>
>
>Yes, you cannot use tags inside java strings in this fashion.  When XSP
>sees this tag, it tries to insert a whole block of code to output the tag
>into the SAX output, which should give you a compilation error.
>
>I'm actually not certain how it is you are able to pass the results of
>esql:get-xml into a function call without getting compilation errors.  The
>get-xml tag also turns into a whole block of code, not an expression which
>can be passed to a function.  What version of Cocoon are you using?  In
>C2.0.3, which I am using, you would be unable to do this, and you would be
>unable to do substitutions inside the returned XML.  Instead, you'd have to
>get the results using get-string, do your substitutions (using < in
>place of <), then run the resulting String through an XML parser to get it
>into the SAX stream.   (A good example of this is the code that implements
>get-xml in the ESQL logicsheet, which is in your cocoon jar file.)
>
>HTH.
>
>-Christopher
>
>
>
>
>|---------+---------------------------->
>|         |           Anders Forsgren  |
>|         |           |         |           rmers.com>       |
>|         |                            |
>|         |           11/04/2003 04:31 |
>|         |           PM               |
>|         |           Please respond to|
>|         |           users            |
>|         |                            |
>|---------+---------------------------->
>  >--------------------------------------------------------------------------------------------------------------|
>  |                                                                                                              |
>  |       To:       users@cocoon.apache.org                                                                      |
>  |       cc:                                                                                                    |
>  |       Subject:  Re: XSP/ESQL escaping                                                                        |
>  >--------------------------------------------------------------------------------------------------------------|
>
>
>
>
>
>      >Where and how is formatMessage() implemented? That is the code we
>really
>
> >need to see, I think.
>
>
>Thanks for your time
>
>The formatMessage is implemented above the problem in the xsp logic
>section, and it (currently) only does this  :
>
>
>public string formatMessage(String message)
>{
>     return instring.replaceAll("\n", "
) >} >
> >the problem area in the xsp, like I said looks like this > >formatMessage(column="body"/>) > >The problem occurs when the xsp:expr contains tags (i.e. if I do the >replace "\n" ---> "foo" , then all is well, but "\n" ---> "" will >not work. ) > >rgds > >Anders > > > >> >> >> >> > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >For additional commands, e-mail: users-help@cocoon.apache.org > > > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >For additional commands, e-mail: users-help@cocoon.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org