You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Donald Ball <ba...@webslingerZ.com> on 2001/02/13 21:10:22 UTC

Re: ESQL dynamic query

On Tue, 13 Feb 2001, Nadine Carlton wrote:

> I've been trying to get some sample code working from
> the mail archive for generating esql output from a dynamic query.  Has
> anyone gotten code like this to work in an <esql:row-results> element?
> Donald posted something a little more complicated with a for
> loop.

<esql:query><xsp:expr>myQueryStringVariable</xsp:expr></esql:query>

> Then I checked the esql.xsd schema and I noticed that there
> is no esql:column.  Have I picked up an obsolete recommendation?
> Is there a way to dynamically get the column element names built
> in the output.  I've tried a couple of things, but the elements like
> esql:get-string don't allow < in the column attribute.  I'm running Cocoon 1.8.2.
> I'm still trying to figure this out, but any help would be appreciated.
>
> <xsp:logic>
>   String foo = "1";
>   <esql:get-string>
>       <esql:column>
>           <xsp:expr>foo</xsp:expr>
>       </esql:column>
>   </esql:get-string>

er, there is no esql:column element. column must be an attribute of the
get-xxx methods.

> Is there a way to dynamically get the column element names built
> in the output

the question doesn't make sense. _you_ choose the element names in the
output. is it the case that you're executing a query and you don't know
the names or the number of columns you're going to receive?

- donald