cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hubert NEOtyk Iwaniuk <hube...@office.ferienwelt.com.pl>
Subject Re: ESQL Nested Queries
Date Wed, 07 Nov 2001 10:03:24 GMT
On Wed, Nov 07, 2001 at 02:15:41AM -0300, Gustavo Nalle Fernandes wrote:

Hi
 
> 	What is the best way to do nested queries using ESQL ? For example I want
> to obtain something like:
> 		<class>
> 		   <student>
> 			<name>...</name>
> 			...
> 		   </student>
> 		</class>
> 		<class>
> 		   <student>
> 			<name>...</name>
> 			...
> 		   </student>
> 		</class>
> 
> 	In my database I have two tables,CLASS and STUDENT.The query is something
> like:
> 		SELECT  CLASS.*,STUDENT.* LEFT OUTER JOIN STUDENT ON CLASS.IDClass =
> STUDENT.IDClass WHERE CLASS.IDSchool = 4
> 
> 	The whole point is that I want to generate a hierarquical tree of database
> objects without having to do several queries (I want to do just one,as shown
> above) i.e.,for each class having to make another query to retrieve its
> students.
> 
> 	Is it possible to do something like this using xsp ,after obtaining the
> row-results ?
> 
> 	  for each class
> 		<class>
> 		   for each student
> 			<student>
> 				<name>..</name>
> 			<student>
> 		  end
> 		</class>
> 	  end
>

To achieve this i use xslt after generation and then serialize to xml.

good luck,
	hubert. 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message