cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luis Arias" <l...@elysia.com>
Subject Re: flaws in XSP implementation PLUS sql taglib features discussion
Date Tue, 01 Feb 2000 20:50:43 GMT

----- Original Message -----
From: Donald Ball <balld@webslingerZ.com>
To: Cocoon <cocoon-dev@xml.apache.org>
Sent: Monday, January 31, 2000 10:20 PM
Subject: flaws in XSP implementation PLUS sql taglib features discussion
>
> <sql:execute-query>
>  <sql:row-element>article</sql:row-element>
>  <sql:query>
>   select id,name,subject_id from article_table
>   <sql:execute-query>
>    <sql:query>
>     select name as subject_name from subject_table where id =
>     <sql:value-of select="../subject_id"/>
>    </sql:query>
>   </sql:execute-query>
>  </sql:query>
> </sql:execute-query>
>

Hi,

I was just wondering why you were thinking of using an "all-xslt" approach
to this ...  Wouldn't it be better for this type of problem to have another
separate mechanism in your taglib that allows you to keep the current row in
the outer result set around for this type of purpose ?  That way if you
could refer to previous result set columns by automagically having them
bound to some name.

For instance, taking up on your example :

<sql:execute-query>
<sql:row-element>article</sql:row-element>
<sql:query id="first">
 select id,name,subject_id from article_table
 <sql:execute-query>
  <sql:query id="second">
   select name as subject_name from subject_table where id =
   <sql:result column="first.id"/>
  </sql:query>
 </sql:execute-query>
</sql:query>
</sql:execute-query>

(Here "first.id" refers to the id column in the result set "of query
"first", of course, and not the "id" attribute in the xml tag.)

Am I missing something big here ?

Luis.


Mime
View raw message