You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andree Halfter <bo...@cryogen.com> on 2000/02/10 17:19:06 UTC

SQL->XSP->SQL

Hi all,

I'm working with Cocoon 1.6.1, XSP works fine and SQL works fine. 
Now my problem: 
I want to get some data from an database: 
<query connection ="xy">select koordinate from table where ...</query> 
No problem. 
Now I want to modify the value "koordinate" (for instance newkoordinate =
koordinate + 10) 
And now (this is the problem) I want to made a 2nd SQL-query with
"newkoordinate". 
<query connection...>select name from table where koordinate <
newkoordinate</query> 
This is my problem, I can't make an sql-query, modify the gotten value and
make an sql-query again. 
How can I do this? 
I don't find anything in the mailing list, or I'm too stupid???

Thanks, Andree



Re: SQL->XSP->SQL

Posted by Donald Ball <ba...@webslingerZ.com>.
On Thu, 10 Feb 2000, Andree Halfter wrote:

> Hi all,
> 
> I'm working with Cocoon 1.6.1, XSP works fine and SQL works fine. 
> Now my problem: 
> I want to get some data from an database: 
> <query connection ="xy">select koordinate from table where ...</query> 
> No problem. 
> Now I want to modify the value "koordinate" (for instance newkoordinate =
> koordinate + 10) 
> And now (this is the problem) I want to made a 2nd SQL-query with
> "newkoordinate". 
> <query connection...>select name from table where koordinate <
> newkoordinate</query> 
> This is my problem, I can't make an sql-query, modify the gotten value and
> make an sql-query again. 
> How can I do this? 
> I don't find anything in the mailing list, or I'm too stupid???

Currently you can't do nested queries. Yes, this sucks. I was working on
addressing this with the SQL XSP taglib, but it seemed to me that I'd need
to have the XSP processor process the same namespace twice, which seems to
be impossible given that the XSP processor is tied to namespace prefixes,
not namespace URIs. Changing that seemed to strongly suggest altering
cocoon to make the master properties object an XML file, which is as far
as I'd gotten until a big project for real work came due and now Pier's
gone and changed the architecture on me.

I'll try to get back on it sometime soon, unless someone else wants to
take a crack at it.

- donald