cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henning von Bargen <H.vonBar...@Triestram-Partner.de>
Subject SQL taglib
Date Mon, 10 Apr 2000 10:00:31 GMT
Well, now I have upgraded to Cocoon 1.7.2 and the sql taglib works well.
Thanks!
Yet I would propose to add another element to the sql-taglib.
sql:post-row
sql:post-row could contain elements that are evaluated for each row
of the result set and and that are added to the output at the end of
the row (before the closing </ROW>).
There should also be an easy way to access the current record's field values
inside the post-row element.

The purpose of this element is to allow easy master-detail query pages.
I mean something like that:

  	<sql:execute-query>
	   <sql:driver>...</sql:driver>
	   <sql:dburl>...</sql:dburl>
	   <sql:username>...</sql:username>
	   <sql:password>...</sql:password>
         <sql:doc-element>DEPT_ROWSET</sql:doc-element>
         <sql:row-element>DEPT_ROW</sql:row-element>
		<sql:query>select * from dept order by dname</sql:query>
  	   <sql:post-row>
           <sql:execute-query>
             <sql:doc-element>EMP_ROWSET</sql:doc-element>
             <sql:row-element>EMP_ROW</sql:row-element>
             <sql:query>
               select *
               from emp
               where emp.dname = $DNAME
               order by ename
             </sql:query>
           </sql:execute-query>
  	   </post-row>

	</sql:execute-query>

I tried to add something like that to the file 
org/apache/cocoon/processor/xsp/library/java/sql.xsl 
but it didn't work of course (the corresponding implementation java files
have to be changed).

What do you think?
Does it make sense?

Henning


Mime
View raw message