cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: esql:get-xml problem
Date Tue, 30 Jan 2001 07:25:37 GMT
On Mon, 29 Jan 2001, [iso-8859-1] Pål Wester wrote:

> This is an example of text i put in my database... then
> I want to edit that text... and since esql
> preserves the root-element, I write like this
>
> <esql:get-xml column="xml"/>
>
> this should give me:
> <text>
> 	content
> 	<b>bold content</b>
> </text>
>
> this creates this exception:
> java.lang.Exception: XSP Java Compiler: Compilation failed for _edit.java
> 326: ';' expected.
> 							this.xspParser.parse(new InputSource(new
> StringReader(_esql_query.resultset.getString("tekst")))).getDocumentElement(
> )

> lookes like the statement lacks a ";".... Now if i write the same
> tag enclosed in xml like this:
> <text>
> 	<esql:get-xml column="xml"/>
> </text>
>
> it compiles successfully with the resulting xml:
> <text>
> 	<text>
> 		content
> 		<b>bold content</b>
> 	</text>
> </text>

(this is the same bug as reported by Sergio Carvalho)

it's because esql:get-xml resulted in an xsp expression, which must be
evaluated in the context of an element in the result tree. i just
committed a patch which tries to work around this by checking to see if
esql:get-xml's parent is esql:row-results and generating different source
if so. check it out of cvs, please, and give it a whirl. thanks.

- donald



Mime
View raw message