cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Myers <phan...@stserv.hcf.jhu.edu>
Subject Re: esql grouping
Date Mon, 05 Nov 2001 22:11:37 GMT
Oops.  Apparently i used this thing for two whole weeks without noticing
that it ruins nested query functionality.  Here is the fix.

Tim


> I hope i'm sending this to the right list:
>
> Attached is a diff to esql.xsl from the cocoon2rc1 release.
>
> I have a change to the esql taglib which allows you to do something like
> this:
>
> <esql:execute-query>
>   <esql:query>
>     select committeeName, title, firstName, middleName, lastName, suffix,
> status from committeeMember left join directoryInformation using(userid)
> left join committee on committee.id=committeeMember.committeeid order by
> committeeName asc
>   </esql:query>
>   <esql:results>
>     <esql:row-results>
>       <esql:group group-on="committeeName">
>         <h2><esql:get-string column="committeeName"/></h2>
>         <ul>
>           <esql:member>
>             <li>
>               <esql:get-string column="title"/>
>               <esql:get-string column="firstName"/>
>               <esql:get-string column="middleName"/>
>               <esql:get-string column="lastName"/>
>               <esql:get-string column="suffix"/>
>             </li>
>           </esql:member>
>         </ul>
>       </esql:group>
>     </esql:row-results>
>   </esql:results>
> </esql:execute-query>
>
> That is, you can do table joins and then insert a header and footer
> whenever a "watched" column value changes.  It follows the nesting
> ideology of <xsp:logic>...<xsp:content></></>
>
> You can nest <esql:group> and <esql:member> indefinately.  I didn't update
> the schema, and it is probably undercommented... especially since i didn't
> insert the xsp-doc stuff that would automatically stick documentation for
> it on the esql website page.  I'll make any adjustments necesarry to it to
> make it more worthy of inclusion in the released version.
>
> Tim Myers
> Student Technology Services
> The Johns Hopkins University
>

Mime
View raw message