cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Seiderer <Peter.Seide...@ciselant.de>
Subject RE: PATCH: add advanced error handling in SQLTransformer plus escape-string element
Date Thu, 29 Nov 2001 20:40:29 GMT
Hello,
first thanks to Jeff Turner and John Morrison both forwarding me the mail from
Carste from the mailing list.

Checked out the cocoon 2.1-dev version today from CVS.

The patch works for me when using avalon-excalibur-4.0.jar and
avalon-framework-4.0.jar instead of avalon-excalibur-20011126.jar and
avalon-framework-20011126.jar.

With avalon-excalibur-20011126.jar and avalon-framework-20011126.jar
I get a java.lang.IllegalMonitorStateException when using the
SQLTransformer.

The log from components.log is attached to the mail.

Peter Seiderer

I am not subscribed to the mailing list. Please reply via
CC to Peter.Seiderer@ciselant.de.

-----Original Message-----
> Date: Wed, 28 Nov 2001 13:05:30 +0100
> From: "Carsten Ziegeler" <cziegeler@s-und-n.de>
> Subject: RE: PATCH: add advanced error handling in SQLTransformer plus
> +escape-string element
> To: <cocoon-dev@xml.apache.org>
> X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
> 
> Hi Peter,
> 
> I applied your patch to the HEAD of the CVS (2.1-dev). Could
> you please cross-check.
> 
> Thanks for your patch,
> 
> Carsten

> -----Original Message-----
> From: Peter Seiderer [mailto:Peter.Seiderer@ciselant.de]
> Sent: Monday, November 26, 2001 9:21 PM
> To: cocoon-dev@xml.apache.org
> Subject: PATCH: add advanced error handling in SQLTransformer plus
> escape-string element
>
>
> Hello,
> the patch attached above brings the following two changes to the
> SQLTransformer:
>
> 1. SQLExceptions coming from query.execute() are catched and the following
> output is added to the resulting xml documenters set
> <sql:rowset>
>  <sql:error>The error messge from the SQLException.<sql:error>
> </sql:rowset>
>
> 2. The element <sql:escape-string> is added. The purpose of this is, that
> you can write the following statement:
>  <sql:execute-query>
>   <sql:query isupdate="true">
>     update test_table set test1 = '<sql:escape-string>A string
> with tick ' and backslash \ in it.</sql:escape-string>'
>   </sql:query>
>  </sql:execute-query>
>
> The tick ' will be escaped with a double tick '' and the backslash will
> be escaped with a double backlslash \\ befor adding to the query string.
>
> With this it is although possible to create sql queries from stylesheets
> using form paramters like in the following example:
>
>  <sql:execute-query>
>   <sql:query isupdate="true">
>     update test_table set
>      test  = '<sql:escape-string><xsl:value-of
> select="$input_test1"/></sql:escape-string>'
>   </sql:query>
>  </sql:execute-query>
>
> Cheers,
>  Peter  Seiderer
>
> I am not subscribed to the mailing list. Please reply via
> CC to Peter.Seiderer@ciselant.de.
>
>


Mime
View raw message